Programming Perl

Programming PerlSearch this book
Previous: 3.2.140 setpgrpChapter 3
Functions
Next: 3.2.142 setsockopt
 

3.2.141 setpriority

setpriority WHICH, WHO, PRIORITY

This function sets the current priority for a process, a process group, or a user. See setpriority(2). Invoking setpriority will produce a fatal error if used on a machine that doesn't implement setpriority(2). To "nice" your process down by four units (the same as executing your program with nice(1)), try:

setpriority 0, 0, getpriority(0, 0) + 4;

The interpretation of a given priority may vary from one operating system to the next.


Previous: 3.2.140 setpgrpProgramming PerlNext: 3.2.142 setsockopt
3.2.140 setpgrpBook Index3.2.142 setsockopt