Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 May 1996 13:59:51 EST
From:      "Kaleb S. KEITHLEY" <kaleb@x.org>
To:        Terry Lambert <terry@lambert.org>
Cc:        joerg_wunsch@uriah.heep.sax.de, chat@freebsd.org
Subject:   Re: Forgiving select() call. 
Message-ID:  <199605281759.NAA19371@exalt.x.org>
In-Reply-To: Your message of Tue, 28 May 1996 09:58:46 EST. <199605281658.JAA11239@phaeton.artisoft.com> 

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

> > (Religious topic, thus moved to chat.)
> > 
> > As Kaleb S. KEITHLEY wrote:
> > 
> > > And, FWIW, SVR4 select(3) is implemented using poll(2), so select on
> > > SVR4, in and of itself, isn't going to have any better granularity
> > > than poll.
> > 
> > Only very few systems actually implement it as a library function (and
> > that's perhaps one of the reasons [along with STREAMS] for the
> > sluggishness of their IP functionality).  All the serious ones
> > implement it as a system call, too.
> 
> Solaris as of 2.3 implementes it as a system call.  I pointed out two
> bugs in the library implementation:

I'm really not sure what you're talking about Terry. There's no select 
in /usr/include/sys/syscall.h in Solaris 2.4 or 2.5. The only man page
is in section 3C. A trivial program that calls select(), linked with 
libc only, can be seen  to call poll when run in truss. nm dumps of the 
shared libs reveal no functions named select or _select save the one in 
libc. A nm dump of select.o from libc.a shows a reference to _poll.

Either you're refering to some secret undocumented system call that you
know about by virtue of seeing the sources, or something that's an extra 
cost add-on. But I suspect there is no such secret undocumented system
call, if only because if there was one, Sun would be using it themselves;
but they aren't, as a truss of /usr/openwin/bin/Xsun will show -- they
call poll.

> 
> 1)	Won't run statically linked SunOS binaries
> 
> 2)	Makes OS non-compliant with SVID III (RT) definition for
> 	select(), since SVID III makes a distinction between system
> 	clock and clock update frequency (setitimer(RT), getitimer(RT),
> 	gettimeofday(RT)).
> 
> Pretty much only silly non-SVID III compliant SVR3/SVR4 implementations
> use select(3) instead of select(2) implementations.

I guess that includes Solaris as one of those "silly non-SVID III 
compliant" implementations. Unixware too. I wonder how Univel could 
have made such an egregious mistake -- there's no reference to a select 
system call in their "Programming with System Calls" reference. None
in the AT&T book either. You'll have to point me to where in the SVID 
it says that a particular library routine must make a call to the system 
at all, much less to a system call with the same name, in order to be
SVID compliant.

If there's a secret undocumented select system call in Solaris, I'd
like to know about it, with something more than anecdotal evidence!

--

Kaleb KEITHLEY



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605281759.NAA19371>