Index of Section 3 Manual Pages

Interix / SUAnice.3Interix / SUA

nice(3)                                                         nice(3)

  nice()

  NAME

    nice() - change a process' nice value

  SYNOPSIS

    #include 

    int nice (int incr)

  DESCRIPTION

    The nice(3) call adds the value of incr to the calling process' nice
    value.

    The nice value determines the priority of a process in scheduling. The
    higher the nice value, the lower the priority. The maximum nice value on
    the system is 2 * {NZERO}-1, and the minimum nice value is zero. ({NZERO}
    is the default process priority.)

  RETURN VALUES

    On success, the nice(3) call returns the new nice value of the process
    minus the default process priority. If it failed, it returns -1 and sets
    errno.

    Note that -1 is a legitimate return value on success if the process is
    allowed to lower its nice value. To check for an error, the application
    should set errno to zero, then call nice(3), and if it returns -1, check
    errno to see if it is non-zero.

  ERRORS

    The nice(3) call can fail for the following reasons:

    [EPERM]
        The incr argument is negative but the calling process does not have
        the appropriate privileges to increase its priority.

  NOTES

    To increase the priority of a process, the calling process must have the
    Windows privilege SE_INC_BASE_PRIORITY_NAME, also called
    SeIncreaseBasePriorityPrivilege.

  SEE ALSO

    nice(1)

    renice(1)

  USAGE NOTES

    The nice function is thread safe.

    The nice function is not async-signal safe.


Interix / SUAHosted at SUA Community for Interix, SUA and SFUInterix / SUA