Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Feb 1999 17:32:04 -0500 (EST)
From:      perlsta <bright@cygnus.rush.net>
To:        Dag-Erling Smorgrav <des@flood.ping.uio.no>
Cc:        "Daniel C. Sobral" <dcs@newsguy.com>, Matthew Dillon <dillon@apollo.backplane.com>, Christoph Kukulies <kuku@gilberto.physik.RWTH-Aachen.DE>, Peter Wemm <peter@netplex.com.au>, Terry Lambert <tlambert@primenet.com>, hackers@FreeBSD.ORG
Subject:   Re: portability of shm, mmap, pipes and socket IPC
Message-ID:  <Pine.BSF.3.96.990210172803.10060O-100000@cygnus.rush.net>
In-Reply-To: <xzpww1q9u9r.fsf@flood.ping.uio.no>

next in thread | previous in thread | raw e-mail | index | archive | help


On 10 Feb 1999, Dag-Erling Smorgrav wrote:

> "Daniel C. Sobral" <dcs@newsguy.com> writes:
> > Dag-Erling Smorgrav wrote:
> > > Matthew Dillon <dillon@apollo.backplane.com> writes:
> > > >     The problem is that linux updates the timeval structure on return,
> > > >     telling you how much time is left.
> > > Yup. I wish FreeBSD did that - the man page already states that one
> > > shouldn't rely on tv not being modified, so it shouldn't break POLA.
> > Manual pages aren't POLA. They are specs. Traditional usage is POLA.
> > Wanna different different behavior? Create a different function.
> 
> Yep, man pages are specs, and when the spec says tv may be modified by
> select(), that means you can't expect it to remain untouched.
> 
> > Besides, given that most usages have no need for this, it would be a
> > wast of space and time.
> 
> On the contrary, it is extremely useful for implementing higher-level
> timeouts. If you want to see the new installer come true, I need to
> implement protocol-level timeouts in libfetch, and that means either
> add a lot of gettimeofday() logic or fix select() to modify tv.

I wish select() did mess with the tv struct, it would have made a lot of
code i did recently easier, and faster with less syscalls.  However if you
impelemnt the change now, i fear that my code will break.  (actually i'm
quite sure i reinit the tv just to be safe)

My suggestion?

select2() which offers the same functionality, however DOES mess with tv.
Leave select() alone. :)

thanks,
-Alfred

> 
> DES
> -- 
> Dag-Erling Smorgrav - des@flood.ping.uio.no


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.990210172803.10060O-100000>