diff options
author | kib <kib@FreeBSD.org> | 2018-05-02 07:57:36 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2018-05-02 07:57:36 +0000 |
commit | a31a7b88e5e784593cf07c3d8c39e1d68769511f (patch) | |
tree | 31ae3ac957c219d285761698aeb39235244ebbd0 /lib | |
parent | 8014ed2822f56d8b8cb1926ddc99b54e577a0b38 (diff) | |
download | FreeBSD-src-a31a7b88e5e784593cf07c3d8c39e1d68769511f.zip FreeBSD-src-a31a7b88e5e784593cf07c3d8c39e1d68769511f.tar.gz |
MFC r332740:
Add PROC_PDEATHSIG_SET to procctl interface.
MFC r332825:
Rename PROC_PDEATHSIG_SET -> PROC_PDEATHSIG_CTL.
MFC r333067:
Remove redundant pipe from pdeathsig.c test.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/sys/procctl.2 | 47 |
1 files changed, 46 insertions, 1 deletions
diff --git a/lib/libc/sys/procctl.2 b/lib/libc/sys/procctl.2 index 9d90f56..4b1d2ba 100644 --- a/lib/libc/sys/procctl.2 +++ b/lib/libc/sys/procctl.2 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 21, 2017 +.Dd April 20, 2018 .Dt PROCCTL 2 .Os .Sh NAME @@ -391,6 +391,37 @@ otherwise. See the note about sysctl .Dv kern.trap_enocap above, which gives independent global control of signal delivery. +.It Dv PROC_PDEATHSIG_CTL +Request the delivery of a signal when the parent of the calling +process exits. +.Fa idtype +must be +.Dv P_PID +and +.Fa id +must be the either caller's pid or zero, with no difference in effect. +The value is cleared for child processes +and when executing set-user-ID or set-group-ID binaries. +.Fa arg +must point to a value of type +.Vt int +indicating the signal +that should be delivered to the caller. +Use zero to cancel a previously requested signal delivery. +.It Dv PROC_PDEATHSIG_STATUS +Query the current signal number that will be delivered when the parent +of the calling process exits. +.Fa idtype +must be +.Dv P_PID +and +.Fa id +must be the either caller's pid or zero, with no difference in effect. +.Fa arg +must point to a memory location that can hold a value of type +.Vt int . +If signal delivery has not been requested, it will contain zero +on return. .El .Sh NOTES Disabling tracing on a process should not be considered a security @@ -487,6 +518,15 @@ parameter for the or .Dv PROC_TRAPCAP_CTL request is invalid. +.It Bq Er EINVAL +The +.Dv PROC_PDEATHSIG_CTL +or +.Dv PROC_PDEATHSIG_STATUS +request referenced an unsupported +.Fa id , +.Fa idtype +or invalid signal number. .El .Sh SEE ALSO .Xr dtrace 1 , @@ -506,3 +546,8 @@ function appeared in The reaper facility is based on a similar feature of Linux and DragonflyBSD, and first appeared in .Fx 10.2 . +The +.Dv PROC_PDEATHSIG_CTL +facility is based on the prctl(PR_SET_PDEATHSIG, ...) feature of Linux, +and first appeared in +.Fx 12.0 . |