From owner-freebsd-chat Tue May 28 12:37:06 1996 Return-Path: owner-chat Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id MAA24153 for chat-outgoing; Tue, 28 May 1996 12:37:06 -0700 (PDT) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id MAA24132 for ; Tue, 28 May 1996 12:37:02 -0700 (PDT) Received: from expo.x.org (expo.x.org [198.112.45.11]) by who.cdrom.com (8.6.12/8.6.11) with ESMTP id LAA07016 for ; Tue, 28 May 1996 11:00:31 -0700 Received: from exalt.x.org by expo.x.org id AA21942; Tue, 28 May 96 13:59:53 -0400 Received: from localhost by exalt.x.org id NAA19371; Tue, 28 May 1996 13:59:51 -0400 Message-Id: <199605281759.NAA19371@exalt.x.org> To: Terry Lambert Cc: joerg_wunsch@uriah.heep.sax.de, chat@freebsd.org Subject: Re: Forgiving select() call. In-Reply-To: Your message of Tue, 28 May 1996 09:58:46 EST. <199605281658.JAA11239@phaeton.artisoft.com> Organization: X Consortium Date: Tue, 28 May 1996 13:59:51 EST From: "Kaleb S. KEITHLEY" Sender: owner-chat@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > (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