xref: /illumos-gate/usr/src/man/man3proc/Pclearsig.3proc (revision 6f1fa39e3cf1b335f342bbca41590e9d76ab29b7)
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 16, 2020
15.Dt PCLEARSIG 3PROC
16.Os
17.Sh NAME
18.Nm Pclearsig ,
19.Nm Lclearsig
20.Nd clear process signals
21.Sh LIBRARY
22.Lb libproc
23.Sh SYNOPSIS
24.In libproc.h
25.Ft int
26.Fo Pclearsig
27.Fa "struct ps_prochandle *P"
28.Fc
29.Ft int
30.Fo Lclearsig
31.Fa "struct ps_lwphandle *L"
32.Fc
33.Sh DESCRIPTION
34During normal operation a process may receive a signal.
35Signals may indicate an error, for example referencing unmapped memory, an alarm
36firing, requests for information, and users requesting an interruption.
37For more information on the generation and usage of signals, see
38.Xr signal.h 3HEAD .
39.Pp
40The
41.Fn Pclearsig
42function instructs the system to clear any signal pending delivery to
43a thread in the process represented by the process handle
44.Fa P .
45The pending signal will never be delivered to process represented by
46.Fa P .
47.Pp
48The
49.Fn Lclearsig
50function is identical to the
51.Fn Pclearsig
52function, except rather than operating on the process and its
53representative thread, it instead operates on the thread handle
54.Fa L .
55.Pp
56The
57.Fn Pclearsig
58function only has meaning for active processes.
59It will fail on process handles corresponding to core files, zombie processes
60and ELF objects.
61.Sh RETURN VALUES
62Upon successful completion, the
63.Fn Pclearsig
64function clears pending faults and
65returns
66.Sy 0 .
67Otherwise,
68.Sy -1
69is returned,
70.Sy errno
71is set to indicate the error,
72and no faults are cleared.
73.Sh ERRORS
74For a full list of possible errors see the
75.Sy DIAGNOSTICS
76section in
77.Xr proc 4 .
78.Sh INTERFACE STABILITY
79.Sy Uncommitted
80.Sh MT-LEVEL
81See
82.Sy LOCKING
83in
84.Xr libproc 3LIB .
85.Sh SEE ALSO
86.Xr signal.h 3HEAD ,
87.Xr libproc 3LIB ,
88.Xr proc 4
89