> I am curious about the rationalization for using select() instead of
> the VTIME/VMIN approach.
> 
> In my programming HOWTO, I recommend against using select() solely on
> the observation that it is designed to work with sockets() 
> and must be 
> more complex that is necessary.
> 
> I have never read anything about select() and when or how it 
> should be 
> used.

Stevens, W.R. 1992 "Advanced Programming in the UNIX Environment", Addison-Wesley, 
advocates the use of select quite nicely.

Select works on writes and exceptions as well as reads. VTIME/VMIN only addresses 
reads. Also,
a single select call can handle multiple file descriptors in one call. VTIME/VMIN 
works fine, so does select.

Select's implementation varies a bit from O/S to O/S. Linux, for instance, changes the 
timeval structure on return (to reflect elapsed time) where most other O/Ses leave it 
unchanged.

-
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to [EMAIL PROTECTED]

Reply via email to