[1188] in linux-net channel archive
Re: select: strange behaviour
daemon@ATHENA.MIT.EDU (Matti E. Aarnio [OH1MQK])
Tue Oct 10 01:08:47 1995
From: "Matti E. Aarnio [OH1MQK]" <mea@mea.cc.utu.fi>
To: norbert@taz.de (Norbert Thies)
Date: Tue, 10 Oct 1995 00:14:33 +0200 (EET)
Cc: linux-net@vger.rutgers.edu
In-Reply-To: <Pine.SV4.3.91.951009093146.23127A-100000@mogli> from "Norbert Thies" at Oct 9, 95 09:47:00 am
> Hi netters,
(select() -timeout "surprise")
> After the timeout has expired, tv.tv_sec == 0,
> ie. the value of 'tv' has been changed in 'select'.
> Since all other *IX systems I tried, do preserve
> the original value it breaks code (actually: archie-1.4.1).
>
> Do you consider this behaviour a feature or is it a bug?
Feature -- as it should be, in fact.
If you look at what the BSD man-pages say about it,
they say "will alter time in future version" -- Linux
does it :-)
I have uses for code where I don't need to query system
time just because I want to know how much time has elapsed
in the select() -- clean timeout is obvious, but when I
have select on fd, and I want to know how long it has been
waited for...
> ciao,
> _____
> Norbert Thies (norbert@taz.de); die tageszeitung, Berlin/Germany
/Matti Aarnio <mea@utu.fi>