143051d27SRobert Mustacchi.\" 243051d27SRobert Mustacchi.\" This file and its contents are supplied under the terms of the 343051d27SRobert Mustacchi.\" Common Development and Distribution License ("CDDL"), version 1.0. 443051d27SRobert Mustacchi.\" You may only use this file in accordance with the terms of version 543051d27SRobert Mustacchi.\" 1.0 of the CDDL. 643051d27SRobert Mustacchi.\" 743051d27SRobert Mustacchi.\" A full copy of the text of the CDDL should have accompanied this 843051d27SRobert Mustacchi.\" source. A copy of the CDDL is also available via the Internet at 943051d27SRobert Mustacchi.\" http://www.illumos.org/license/CDDL. 1043051d27SRobert Mustacchi.\" 1143051d27SRobert Mustacchi.\" 1243051d27SRobert Mustacchi.\" Copyright 2015 Joyent, Inc. 1343051d27SRobert Mustacchi.\" 14*d0b89badSPeter Tribble.Dd May 16, 2020 1543051d27SRobert Mustacchi.Dt PCLEARSIG 3PROC 1643051d27SRobert Mustacchi.Os 1743051d27SRobert Mustacchi.Sh NAME 1843051d27SRobert Mustacchi.Nm Pclearsig , 1943051d27SRobert Mustacchi.Nm Lclearsig 2043051d27SRobert Mustacchi.Nd clear process signals 21ab618543SJohn Levon.Sh LIBRARY 2243051d27SRobert Mustacchi.Lb libproc 23ab618543SJohn Levon.Sh SYNOPSIS 2443051d27SRobert Mustacchi.In libproc.h 2543051d27SRobert Mustacchi.Ft int 2643051d27SRobert Mustacchi.Fo Pclearsig 2743051d27SRobert Mustacchi.Fa "struct ps_prochandle *P" 2843051d27SRobert Mustacchi.Fc 2943051d27SRobert Mustacchi.Ft int 3043051d27SRobert Mustacchi.Fo Lclearsig 3143051d27SRobert Mustacchi.Fa "struct ps_lwphandle *L" 3243051d27SRobert Mustacchi.Fc 3343051d27SRobert Mustacchi.Sh DESCRIPTION 3472d3dbb9SYuri PankovDuring normal operation a process may receive a signal. 3572d3dbb9SYuri PankovSignals may indicate an error, for example referencing unmapped memory, an alarm 3643051d27SRobert Mustacchifiring, requests for information, and users requesting an interruption. 3743051d27SRobert MustacchiFor more information on the generation and usage of signals, see 3843051d27SRobert Mustacchi.Xr signal.h 3HEAD . 3943051d27SRobert Mustacchi.Pp 4043051d27SRobert MustacchiThe 4143051d27SRobert Mustacchi.Fn Pclearsig 4243051d27SRobert Mustacchifunction instructs the system to clear any signal pending delivery to 4343051d27SRobert Mustacchia thread in the process represented by the process handle 4443051d27SRobert Mustacchi.Fa P . 4543051d27SRobert MustacchiThe pending signal will never be delivered to process represented by 4643051d27SRobert Mustacchi.Fa P . 4743051d27SRobert Mustacchi.Pp 4843051d27SRobert MustacchiThe 4943051d27SRobert Mustacchi.Fn Lclearsig 5043051d27SRobert Mustacchifunction is identical to the 5143051d27SRobert Mustacchi.Fn Pclearsig 5243051d27SRobert Mustacchifunction, except rather than operating on the process and its 53*d0b89badSPeter Tribblerepresentative thread, it instead operates on the thread handle 5443051d27SRobert Mustacchi.Fa L . 5543051d27SRobert Mustacchi.Pp 5643051d27SRobert MustacchiThe 5743051d27SRobert Mustacchi.Fn Pclearsig 5872d3dbb9SYuri Pankovfunction only has meaning for active processes. 5972d3dbb9SYuri PankovIt will fail on process handles corresponding to core files, zombie processes 6072d3dbb9SYuri Pankovand ELF objects. 6143051d27SRobert Mustacchi.Sh RETURN VALUES 6243051d27SRobert MustacchiUpon successful completion, the 6343051d27SRobert Mustacchi.Fn Pclearsig 6443051d27SRobert Mustacchifunction clears pending faults and 6543051d27SRobert Mustacchireturns 6643051d27SRobert Mustacchi.Sy 0 . 6743051d27SRobert MustacchiOtherwise, 6843051d27SRobert Mustacchi.Sy -1 6943051d27SRobert Mustacchiis returned, 7043051d27SRobert Mustacchi.Sy errno 7143051d27SRobert Mustacchiis set to indicate the error, 7243051d27SRobert Mustacchiand no faults are cleared. 7343051d27SRobert Mustacchi.Sh ERRORS 7443051d27SRobert MustacchiFor a full list of possible errors see the 7543051d27SRobert Mustacchi.Sy DIAGNOSTICS 7643051d27SRobert Mustacchisection in 7743051d27SRobert Mustacchi.Xr proc 4 . 7843051d27SRobert Mustacchi.Sh INTERFACE STABILITY 7943051d27SRobert Mustacchi.Sy Uncommitted 8043051d27SRobert Mustacchi.Sh MT-LEVEL 8143051d27SRobert MustacchiSee 8243051d27SRobert Mustacchi.Sy LOCKING 8343051d27SRobert Mustacchiin 8443051d27SRobert Mustacchi.Xr libproc 3LIB . 8543051d27SRobert Mustacchi.Sh SEE ALSO 8643051d27SRobert Mustacchi.Xr signal.h 3HEAD , 8743051d27SRobert Mustacchi.Xr libproc 3LIB , 8843051d27SRobert Mustacchi.Xr proc 4 89