1. Home
  2. Computing & Technology
  3. Linux
Linux / Unix Command: nice
Command Library

NAME

nice - change process priority  

SYNOPSIS

#include <unistd.h>

int nice(int inc);  

DESCRIPTION

nice adds inc to the nice value for the calling pid. (A large nice value means a low priority.) Only the superuser may specify a negative increment, or priority increase.  

RETURN VALUE

On success, zero is returned. On error, -1 is returned, and errno is set appropriately.  

ERRORS

EPERM
A non-super user attempts to do a priority increase by supplying a negative inc.
 

CONFORMING TO

SVr4, SVID EXT, AT&T, X/OPEN, BSD 4.3. However, the Linux and glibc (earlier than glibc 2.2.4) return value is nonstandard, see below. SVr4 documents an additional EINVAL error code.  

SEE ALSO

nice(1), getpriority(2), setpriority(2), fork(2), renice(8)


Important: Use the man command (% man) to see how a command is used on your particular computer.

>> Linux/Unix Command Library

>> Shell Command Library

Explore Linux

More from About.com

  1. Home
  2. Computing & Technology
  3. Linux

©2008 About.com, a part of The New York Times Company.

All rights reserved.