1*15c5c5f4Suwe.\" $NetBSD: _lwp_kill.2,v 1.5 2022/12/04 16:17:50 uwe Exp $ 224d35c85Sad.\" 324d35c85Sad.\" Copyright (c) 2003, 2007 The NetBSD Foundation, Inc. 424d35c85Sad.\" All rights reserved. 524d35c85Sad.\" 624d35c85Sad.\" This code is derived from software contributed to The NetBSD Foundation 724d35c85Sad.\" by Jason R. Thorpe of Wasabi Systems, Inc, and by Andrew Doran. 824d35c85Sad.\" 924d35c85Sad.\" Redistribution and use in source and binary forms, with or without 1024d35c85Sad.\" modification, are permitted provided that the following conditions 1124d35c85Sad.\" are met: 1224d35c85Sad.\" 1. Redistributions of source code must retain the above copyright 1324d35c85Sad.\" notice, this list of conditions and the following disclaimer. 1424d35c85Sad.\" 2. Redistributions in binary form must reproduce the above copyright 1524d35c85Sad.\" notice, this list of conditions and the following disclaimer in the 1624d35c85Sad.\" documentation and/or other materials provided with the distribution. 1724d35c85Sad.\" 1824d35c85Sad.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 1924d35c85Sad.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 2024d35c85Sad.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 2124d35c85Sad.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 2224d35c85Sad.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2324d35c85Sad.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2424d35c85Sad.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2524d35c85Sad.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2624d35c85Sad.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 2724d35c85Sad.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 2824d35c85Sad.\" POSSIBILITY OF SUCH DAMAGE. 2924d35c85Sad.\" 30e7cc9f60Sad.Dd January 20, 2007 3124d35c85Sad.Dt _LWP_KILL 2 3224d35c85Sad.Os 3324d35c85Sad.Sh NAME 3424d35c85Sad.Nm _lwp_kill 3524d35c85Sad.Nd send a signal to a light-weight process 3624d35c85Sad.Sh LIBRARY 3724d35c85Sad.Lb libc 3824d35c85Sad.Sh SYNOPSIS 3924d35c85Sad.In lwp.h 4024d35c85Sad.Ft int 4124d35c85Sad.Fn _lwp_kill "lwpid_t lwp" "int sig" 4224d35c85Sad.Sh DESCRIPTION 4324d35c85Sad.Fn _lwp_kill 4424d35c85Sadsends the signal specified by 4524d35c85Sad.Fa sig 4624d35c85Sadto the light-weight process specified by 4724d35c85Sad.Fa lwp . 4824d35c85SadIf the 4924d35c85Sad.Fa sig 5024d35c85Sadargument is given as 0 (zero), 5124d35c85Sad.Nm 52791f9db9Szaferwill test for the existence of the target LWP, but will take no further 5324d35c85Sadaction. 5424d35c85Sad.Pp 5524d35c85SadJob control signals and uncatchable signals can not be directed to a specific 5624d35c85SadLWP: if posted with 5724d35c85Sad.Nm , 5824d35c85Sadthey will affect all LWPs in the process. 5924d35c85Sad.Pp 6024d35c85SadSignals will be posted successfully to suspended LWPs, but will not be 6124d35c85Sadhandled further until the LWP has been continued. 6224d35c85Sad.Sh RETURN VALUES 63*15c5c5f4Suwe.Rv -std _lwp_kill 6424d35c85Sad.Sh ERRORS 65*15c5c5f4Suwe.Bl -tag -width Er 6624d35c85Sad.It Bq Er EINVAL 6724d35c85Sad.Fa sig 6824d35c85Sadis not a valid signal number. 6924d35c85Sad.It Bq Er ESRCH 7024d35c85SadNo LWP can be found in the current process corresponding to that 7124d35c85Sadspecified by 7224d35c85Sad.Fa lwp . 7324d35c85Sad.El 7424d35c85Sad.Sh SEE ALSO 7524d35c85Sad.Xr _lwp_continue 2 , 7624d35c85Sad.Xr _lwp_suspend 2 , 7724d35c85Sad.Xr kill 2 , 7824d35c85Sad.Xr sigaction 2 , 7924d35c85Sad.Xr signal 7 8024d35c85Sad.Sh HISTORY 8124d35c85SadThe 8224d35c85Sad.Fn _lwp_kill 8324d35c85Sadsystem call first appeared in 8424d35c85Sad.Nx 5.0 . 85