Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
prctl(2)
Edit
PageHistory
Diff
Info
LikePages
!!NAME 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''__);__ !!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(). ;__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. !!ERRORS ;[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''__);__ 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. !!SEE ALSO signal(2)
One page links to
prctl(2)
:
Man2p
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.