xref: /illumos-gate/usr/src/man/man3proc/Pclearsig.3proc (revision 8c69cc8fbe729fa7b091e901c4b50508ccc6bb33)
1.\"
2.\" This file and its contents are supplied under the terms of the
3.\" Common Development and Distribution License ("CDDL"), version 1.0.
4.\" You may only use this file in accordance with the terms of version
5.\" 1.0 of the CDDL.
6.\"
7.\" A full copy of the text of the CDDL should have accompanied this
8.\" source.  A copy of the CDDL is also available via the Internet at
9.\" http://www.illumos.org/license/CDDL.
10.\"
11.\"
12.\" Copyright 2015 Joyent, Inc.
13.\"
14.Dd May 11, 2016
15.Dt PCLEARSIG 3PROC
16.Os
17.Sh NAME
18.Nm Pclearsig ,
19.Nm Lclearsig
20.Nd clear process signals
21.Sh SYNOPSIS
22.Lb libproc
23.In libproc.h
24.Ft int
25.Fo Pclearsig
26.Fa "struct ps_prochandle *P"
27.Fc
28.Ft int
29.Fo Lclearsig
30.Fa "struct ps_lwphandle *L"
31.Fc
32.Sh DESCRIPTION
33During normal operation a process may receive a signal.
34Signals may indicate an error, for example referencing unmapped memory, an alarm
35firing, requests for information, and users requesting an interruption.
36For more information on the generation and usage of signals, see
37.Xr signal.h 3HEAD .
38.Pp
39The
40.Fn Pclearsig
41function instructs the system to clear any signal pending delivery to
42a thread in the process represented by the process handle
43.Fa P .
44The pending signal will never be delivered to process represented by
45.Fa P .
46.Pp
47The
48.Fn Lclearsig
49function is identical to the
50.Fn Pclearsig
51function, except rather than operating on the process and its
52representive thread, it instead operates on the thread handle
53.Fa L .
54.Pp
55The
56.Fn Pclearsig
57function only has meaning for active processes.
58It will fail on process handles corresponding to core files, zombie processes
59and ELF objects.
60.Sh RETURN VALUES
61Upon successful completion, the
62.Fn Pclearsig
63function clears pending faults and
64returns
65.Sy 0 .
66Otherwise,
67.Sy -1
68is returned,
69.Sy errno
70is set to indicate the error,
71and no faults are cleared.
72.Sh ERRORS
73For a full list of possible errors see the
74.Sy DIAGNOSTICS
75section in
76.Xr proc 4 .
77.Sh INTERFACE STABILITY
78.Sy Uncommitted
79.Sh MT-LEVEL
80See
81.Sy LOCKING
82in
83.Xr libproc 3LIB .
84.Sh SEE ALSO
85.Xr signal.h 3HEAD ,
86.Xr libproc 3LIB ,
87.Xr proc 4
88