Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site utcs.UUCP Path: utzoo!utcs!geoff From: geoff@utcs.UUCP (Geoff Collyer) Newsgroups: net.unix-wizards,net.bugs.4bsd Subject: nice(1) takes an absolute priority argument Message-ID: <243@utcs.UUCP> Date: Tue, 4-Dec-84 02:38:01 EST Article-I.D.: utcs.243 Posted: Tue Dec 4 02:38:01 1984 Date-Received: Tue, 4-Dec-84 02:40:36 EST Organization: University of Toronto - General Purpose UNIX Lines: 26 Index: bin/nice.c 4.2BSD Description: Despite the claim in nice(1) that the number argument is the amount by which ``the priority is incremented'', it is actually presented to setpriority(2) as an *absolute* priority, not an increment. Repeat-By: As an ordinary (non-super) user, type nice -2 nice -1 date nice will print setpriority: Permission denied Fix: My fix was to use nice(3c) instead of the overkill of getpriority(2). Diffs follow: 7,9d4 < #include< #include < 24,27c20 < if (setpriority(PRIO_PROCESS, 0, nicarg) < 0) { < perror("setpriority"); < exit(1); < } --- > nice(nicarg);