From: Michael O'Reilly (oreillym@tartarus.uwa.edu.au)
Date: 02/12/93


From: oreillym@tartarus.uwa.edu.au (Michael O'Reilly)
Subject: Re: select() ?
Date: 12 Feb 1993 07:13:14 GMT

Matthias Urlichs (urlichs@smurf.sub.org) wrote:
: Why does select() change the timeout (last argument)?
:
: I found three reasons why that shouldn't happen:
: - The remaining time can easily be obtained by calling gettimeofday().

Why use another system call when select() should return it anyway.

: - This breaks the RPC code in the C library because when a remote
: portmapper doesn't reply, the modified timeout is used again.

This is broken code, NOT broken select(). If you examine the BSD
docs's on select, they state that the timeout argument may in the
future reflect how long the process slept, and that you SHOULDN'T rely
on the value being un-changed.

: - I checked the manpages of Ultrix and SunOS. Neither says that the
: timeout argument is changed.

Check the BSD man pages.
 
: Matthias Urlichs -- urlichs@smurf.sub.org -- urlichs@smurf.ira.uka.de
Michael