Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ll-xn!cit-vax!mangler From: mangler@cit-vax.Caltech.Edu (System Mangler) Newsgroups: news.software.b Subject: Re: Double niceness in rnews Message-ID: <1334@cit-vax.Caltech.Edu> Date: Fri, 12-Dec-86 11:19:01 EST Article-I.D.: cit-vax.1334 Posted: Fri Dec 12 11:19:01 1986 Date-Received: Mon, 15-Dec-86 04:34:57 EST References: <215@acornrc.UUCP> Organization: California Institute of Technology Lines: 28 Keywords: nice, NICENESS, rnews, inews.c, 2.10.3 Summary: *triple* the niceness in 2.10.3 In article <215@acornrc.UUCP>, bob@acornrc.UUCP (Bob Weissman) writes: > I notice that having defined NICENESS=4 in defs.h, that rnews ends up > running at niceness=8. compress and unbatch run properly at niceness=4. Scenario: uux hands a compressed batch to rnews. Rnews nices itself by NICENESS, sees the "#", runs unbatch, which sees "#! cunbatch" and runs cunbatch, which uncompresses the batch and feeds it to rnews. Rnews nices itself by a second NICENESS, sees a '#', runs unbatch, which sees "#! rnews" and runs rnews. This nices itself by a third NICENESS, and installs the article. We have NICENESS set to 6. Fortunately we get very little compressed news, favoring nntp instead. Nntpd runs at nice 4, so that nntp news reception runs at nice 10 as we intend. The fix is obvious: don't invoke nice() until after checkbatch(). > My online manual (4.2bsd) suggests that nice() is obsolete in favor > of setpriority(), which doesn't have the "feature" that its argument > is added to the previous niceness. Uh, sure, ever write a (Bourne-shell) script that does "nice -4" and notice that the script bombs if your nice value is already more than 4? That comes about because /bin/nice was converted to use setpriority... In 4.3bsd, /bin/nice has been restored to the 4.1bsd functionality, though sadly the simple, working 4.1bsd code was not used... Don Speck speck@vlsi.caltech.edu {seismo,rutgers,ames}!cit-vax!speck