Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!husc6!necntc!ames!oliveb!sun!gorodish!guy From: guy%gorodish@Sun.COM (Guy Harris) Newsgroups: comp.lang.c Subject: Re: Weird syscall returns Message-ID: <23297@sun.uucp> Date: Mon, 13-Jul-87 14:05:14 EDT Article-I.D.: sun.23297 Posted: Mon Jul 13 14:05:14 1987 Date-Received: Wed, 15-Jul-87 00:43:22 EDT References: <1158@copper.TEK.COM> <6858@auspyr.UUCP> <17171@cca.CCA.COM> <235@wrs.UUCP> Sender: news@sun.uucp Lines: 16 > >> I can think of no Unix system call that doesn't return -1 on error. > > > >What about nice()? > > Well I don't know about your system, but on ours (ISI 68K - BSD 4.3) > there ain't no entry for nice in sect. 2 of the manual - it's in section 3. > What this tells me is that nice(3) isn't a direct system call. In fact it > goes via [sg]etpriority(2) which IS a system type call... Yes, but that's only the case on systems that have derived their "nice" and "[sg]etpriority" implementations from the 4.[23]BSD one. On other UNIX systems, "nice" *is* a system call, and it *does* return -1 on error. Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com