Rev | Author | # | Line |
---|---|---|---|
1 | perry | 1 | !!NAME |
2 | PerryLorier | 2 | prctl - operations on a process |
1 | perry | 3 | |
4 | !!SYNOPSIS | ||
2 | PerryLorier | 5 | __#include <sys/prctl.h>__ |
6 | __int prctl(int__ ''option''__, unsigned long__ ''arg2''__, unsigned long__ ''arg3'' __, unsigned long__ ''arg4''__, unsigned long__ ''arg5''__);__ | ||
1 | perry | 7 | |
8 | !!DESCRIPTION | ||
2 | PerryLorier | 9 | __prctl__ is called with a first argument describing what to do (with values defined in ''<linux/prctl.h>''), and further parameters with a significance depending on the first one. The first argument can be: |
1 | perry | 10 | |
2 | PerryLorier | 11 | ;__PR_SET_PDEATHSIG__: (since Linux 2.1.57) Set the parent process death signal of the current process to ''arg2'' (either a signal value in the range 1..maxsig, or 0 to clear). This is the signal that the current process will get when its parent dies. This value is cleared upon a fork(). |
1 | perry | 12 | |
2 | PerryLorier | 13 | ;__PR_GET_PDEATHSIG__: (since Linux 2.3.15) Read the current value of the parent process death signal into the (int *) ''arg2''. |
1 | perry | 14 | |
15 | !!RETURN VALUE | ||
2 | PerryLorier | 16 | On success, zero is returned. On error, -1 is returned, and ''errno'' is set appropriately. |
1 | perry | 17 | |
18 | !!ERRORS | ||
2 | PerryLorier | 19 | ;[EINVAL]: The value of ''option'' is not recognized, or it is __PR_SET_PDEATHSIG__ and ''arg2'' is not zero or a signal number. |
1 | perry | 20 | |
21 | !!CONFORMING TO | ||
2 | PerryLorier | 22 | This call is Linux-specific. IRIX has a prctl system call (also introduced in Linux 2.1.44 as irix_prctl on the MIPS architecture), with prototype |
1 | perry | 23 | |
2 | PerryLorier | 24 | __ptrdiff_t prctl(int__ ''option''__, int__ ''arg2''__, int__ ''arg3''__);__ |
1 | perry | 25 | |
2 | PerryLorier | 26 | and options to get the maximum number of processes per user, get the maximum number of processors the calling process can use, find out whether a specified process is currently blocked, get or set the maximum stack size, etc., etc. |
1 | perry | 27 | !!AVAILABILITY |
2 | PerryLorier | 28 | The prctl() systemcall was introduced in Linux 2.1.57. There is no prctl() library call as yet. |
1 | perry | 29 | |
30 | !!SEE ALSO | ||
31 | signal(2) |
lib/blame.php:177: Warning: Invalid argument supplied for foreach() (...repeated 9 times)