Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Feb 1999 01:15:43 -0700
From:      Warner Losh <imp@village.org>
To:        Stephen McKay <syssgm@detir.qld.gov.au>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: select(2) proposed change 
Message-ID:  <199902180815.BAA66534@harmony.village.org>
In-Reply-To: Your message of "Thu, 18 Feb 1999 17:42:10 %2B1000." <199902180742.RAA27123@nymph.detir.qld.gov.au> 
References:  <199902180742.RAA27123@nymph.detir.qld.gov.au>  <199902180511.WAA65110@harmony.village.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <199902180742.RAA27123@nymph.detir.qld.gov.au> Stephen McKay writes:
: On Wednesday, 17th February 1999, Warner Losh wrote:
: 
: >Actually, please review these changes.  They are closer to english
: >than the last one.
: 
: >+Other systems may modify timeout, but no current ones do it by default.
: 
: I am possibly displaying my ignorance, but I thought linux did this
: by default. 

No.  Linux used to do this by default, but no longer does it by
default.  There is a separate system call to do that.  I must confess
that I do not have a Linux system to absolutely verify this on,
however.

: >+A future, different system call might modify timeval, but too much legacy
: >+code exists which depends on this behavior.
: >+Therefore,
: >+.Fn select
: >+will likely never change to modify timeout.
: 
: I would prefer to keep the fire and brimstone warning.

Nothing has been remvoed, the warning is still there.

: select() should
: be changed to do the subtraction.

Select should *NEVER* be changed to do the subtraction.  There are
*NO* current systems that do this by default.  FreeBSD shouldn't
change.  It is a *********S***T***U***P***I***D********** idea to
change the semantics of select(2) at this late stage of the game.

I've been there with the Linux experiment back in the 0.99p14
timeframe of Linux.  I cannot tell you the number of bogus programs
out there that caused 100% cpu usage.  If I recall my history
correctly, a new system call was added, __bsd_select, which didn't
change the timeout parameter.  select was #defined to this, unless you
did something to prevent it.  I think at first this was in the -lbsd
library that merged into libc over time and is now the default.  I'll
check with my Linux running friends to verify things.

If you want to create a __linux_select or select2 or some *OTHER*
system call that does this for you, then I have no objections.

Warner


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?199902180815.BAA66534>