* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
"@(#) Copyright (c) 1980 Regents of the University of California.\n\
static char sccsid
[] = "@(#)nice.c 5.2 (Berkeley) %G%";
#include <sys/resource.h>
if (argc
> 1 && argv
[1][0] == '-') {
nicarg
= atoi(&argv
[1][1]);
fputs("usage: nice [ -n ] command\n", stderr
);
if (setpriority(PRIO_PROCESS
, 0,
getpriority(PRIO_PROCESS
, 0) + nicarg
) < 0) {
execvp(argv
[1], &argv
[1]);