[1194] in linux-net channel archive
Re: select: strange behaviour
daemon@ATHENA.MIT.EDU (H. Peter Anvin)
Tue Oct 10 18:55:28 1995
To: submit-linux-dev-net@ratatosk.yggdrasil.com
From: hpa@loki.yggdrasil.com (H. Peter Anvin)
Date: 10 Oct 1995 05:39:36 GMT
Reply-To: hpa@storm.net (H. Peter Anvin)
Followup to: <Pine.LNX.3.91.951009165713.32440A-100000@redhat.com>
By author: Erik Troan <ewt@redhat.com>
In newsgroup: linux.dev.net
>
> On Mon, 9 Oct 1995, Norbert Thies wrote:
>
> > 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?
>
> POSIX says the timeout value should be changed. Most other Unix vendors
> don't actually do so, but Linux is following the POSIX requirement here.
>
Actually, POSIX doesn't mention select(). It has, however, been
clearly documented in the past that BSD intends to implement the
behaviour Linux does have now, so it is the software that is broken,
not Linux.
However, linking with -lbsd under Linux will invoke the "old" BSD
behaviour.
/hpa
--
PGP public key available - finger hpa@terminus.storm.net
"The earth is but one country, and mankind its citizens." -- Bahá'u'lláh
I don't work for Yggdrasil, but they sponsor the linux.* hierarchy.