* Copyright (c) 1989 The Regents of the University of California.
* %sccs.include.redist.c%
"@(#) Copyright (c) 1989 The Regents of the University of California.\n\
static char sccsid
[] = "@(#)nice.c 5.4 (Berkeley) %G%";
#include <sys/resource.h>
if (isdigit(argv
[1][1])) {
niceness
= atoi(argv
[1] + 1);
(void)fprintf(stderr
, "nice: illegal option -- %c\n",
niceness
+= getpriority(PRIO_PROCESS
, 0);
(void)fprintf(stderr
, "nice: getpriority: %s\n",
if (setpriority(PRIO_PROCESS
, 0, niceness
)) {
"nice: setpriority: %s\n", strerror(errno
));
execvp(argv
[1], &argv
[1]);
"nice: %s: %s\n", argv
[1], strerror(errno
));
"nice [ -# ] command [ options ] [ operands ]\n");