Differences between version 2 and previous revision of prctl(2).
Other diffs: Previous Major Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 2 | Last edited on Sunday, March 16, 2003 6:37:33 pm | by PerryLorier | Revert |
Older page: | version 1 | Last edited on Tuesday, June 4, 2002 12:23:44 am | by perry | Revert |
@@ -1,90 +1,31 @@
-PRCTL
-!!!PRCTL
-NAME
-SYNOPSIS
-DESCRIPTION
-RETURN VALUE
-ERRORS
-CONFORMING TO
-AVAILABILITY
-SEE ALSO
-----
!!NAME
+prctl - operations on a process
-
-prctl - operations on a process
!!SYNOPSIS
+ __#include <sys/prctl.h>__
+ __int prctl(int__ ''option''__, unsigned long__ ''arg2''__, unsigned long__ ''arg3'' __, unsigned long__ ''arg4''__, unsigned long__ ''arg5''__);__
-
-__#include __
-
-
-__int prctl(int__ ''option''__, unsigned long__
-''arg2''__, unsigned long__ ''arg3'' __, unsigned
-long__ ''arg4''__, unsigned long__
-''arg5''__);__
!!DESCRIPTION
+__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:
+;__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().
-__prctl
__ is called with a first argument describing what
-to do (with values defined in
__linux/prctl
.h
''
-
''
+;
__PR
_GET
_PDEATHSIG
__: (since Linux 2
.3.15) Read the current value of the parent process death signal into the (int *)
''arg2
''.
-
-__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().
-
-
-__PR_GET_PDEATHSIG__
-
-
-(since Linux 2.3.15) Read the current value of the parent
-process death signal into the (int *)
-''arg2''.
!!RETURN VALUE
+On success, zero is returned. On error, -1 is returned, and ''errno'' is set appropriately.
-
-On success, zero is returned. On error, -1 is returned, and
-''errno'' is set appropriately.
!!ERRORS
+;[EINVAL]: The value of ''option'' is not recognized, or it is __PR_SET_PDEATHSIG__ and ''arg2'' is not zero or a signal number.
-
-__EINVAL__
-
-
-The value of ''option'' is not recognized, or it is
-__PR_SET_PDEATHSIG__ and ''arg2'' is not zero or a
-signal number.
!!CONFORMING TO
+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
+ __ptrdiff_t prctl(int__ ''option''__, int__ ''arg2''__, int__ ''arg3''__);__
-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
-
-
-__ptrdiff_t prctl(int__ ''option''__, int__
-''arg2''__, int__ ''arg3''__);__
-
-
-
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.
+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.
!!AVAILABILITY
+The prctl() systemcall was introduced in Linux 2.1.57. There is no prctl() library call as yet.
-
-The prctl() systemcall was introduced in Linux 2.1.57. There
-is no prctl() library call as yet.
!!SEE ALSO
-
-
signal(2)
-----