Subj : Re: Threading and Timeouts To : comp.programming.threads From : Marcin 'Qrczak' Kowalczyk Date : Thu Jul 21 2005 12:40 am Giancarlo Niccolai writes: > If any of this weren't the case, then the POSIX specifications about > select() wouldn't be possibly fulfilled, as it explicitly says that after > that select() declares a socket ready, it MUST NOT BLOCK the very next > operation for which select() was queried . POSIX specification for write() says that for pipes and fifos a partial write is only possible with O_NONBLOCK set. It implies that this is true also for other descriptors which are not files, e.g.: When attempting to write to a file descriptor (other than a pipe or FIFO) that supports non-blocking writes and cannot accept the data immediately: * If the O_NONBLOCK flag is clear, write() shall block the calling thread until the data can be accepted. * If the O_NONBLOCK flag is set, write() shall not block the thread. If some data can be written without blocking the thread, write() shall write what it can and return the number of bytes written. Oth- erwise, it shall return -1 and set errno to [EAGAIN]. -- __("< Marcin Kowalczyk \__/ qrczak@knm.org.pl ^^ http://qrnik.knm.org.pl/~qrczak/ .