Subj : Re: Threading and Timeouts To : comp.programming.threads From : Marcin 'Qrczak' Kowalczyk Date : Wed Jul 20 2005 01:50 pm Giancarlo Niccolai writes: > Actually, I found that blocking i/o with select or poll works fine. > Once select returns signaling that a socket can be read/written, > a single read/write operation is GUARANTEED not to block; Except when another processes reads it in the meantime, and except that Linux has a bug where certain socket activities trigger select to return but there is nothing to read. And of course with blocking sockets you have to select before each read, and with non-blocking ones you only select when read fails with EAGAIN. select is primarily designed for non-blocking I/O. -- __("< Marcin Kowalczyk \__/ qrczak@knm.org.pl ^^ http://qrnik.knm.org.pl/~qrczak/ .