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. Signals may 34indicate 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. It will fail on process 58handles corresponding to core files, zombie processes and ELF objects. 59.Sh RETURN VALUES 60Upon successful completion, the 61.Fn Pclearsig 62function clears pending faults and 63returns 64.Sy 0 . 65Otherwise, 66.Sy -1 67is returned, 68.Sy errno 69is set to indicate the error, 70and no faults are cleared. 71.Sh ERRORS 72For a full list of possible errors see the 73.Sy DIAGNOSTICS 74section in 75.Xr proc 4 . 76.Sh INTERFACE STABILITY 77.Sy Uncommitted 78.Sh MT-LEVEL 79See 80.Sy LOCKING 81in 82.Xr libproc 3LIB . 83.Sh SEE ALSO 84.Xr signal.h 3HEAD , 85.Xr libproc 3LIB , 86.Xr proc 4 87