[vox-tech] how to be not nice within C

nbs vox-tech@lists.lugod.org
Mon, 25 Mar 2002 17:50:25 -0800


On Mon, Mar 25, 2002 at 05:43:54PM -0800, Peter Jay Salzman wrote:
> is there a way for an executable written in C to change its own nice
> value?
> 
> is there a system call that does this sort of thing?

As seen in "man 2 nice":

  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  super
       user   may  specify  a  negative  increment,  or  priority
       increase.


(hoping that cut/pasted ok from man)

-bill!