Nice() in Sys V.4

Mike Wescott wescott at Columbia.NCR.COM
Fri Mar 22 05:17:52 AEST 1991


In article <318 at secola.Columbia.NCR.COM> krupczak at secola.Columbia.NCR.COM (Bobby Krupczak) writes:
> In V.4, there is a /proc file system.
[...]
> I found
> a ioctl() option that will allow one to set the nice value of a process.
> Unforntunately, the header files do not tell what the arguments are.

See proc(4) in the FM:

	Information and  control  operations  are  provided  through
	ioctl.  These have the form:

		#include <sys/types.h>
		#include <sys/signal.h>
		#include <sys/fault.h>
		#include <sys/syscall.h>
		#include <sys/procfs.h>
		void *p;
		retval = ioctl(fildes, code, p);

	The argument p is a generic pointer whose  type  depends  on
	the  specific  ioctl code.  Where not specifically mentioned
	below, its value should be  zero.   <sys/procfs.h>  contains

	[...]

    PIOCNICE*
	The traced process's nice priority  is  incremented  by  the
	amount  contained  in  the  int  addressed  by  p.  Only the
	super-user may better a process's priority in this way,  but
	any user may make the priority worse.

--
	-Mike Wescott
	 mike.wescott at ncrcae.Columbia.NCR.COM



More information about the Comp.unix.programmer mailing list