1f9366a82SSimon Schubert.\" Copyright (c) 2007 The DragonFly Project. All rights reserved. 2f9366a82SSimon Schubert.\" 3f9366a82SSimon Schubert.\" This code is derived from software contributed to The DragonFly Project 4f9366a82SSimon Schubert.\" by Simon 'corecode' Schubert <corecode@fs.ei.tum.de> 5f9366a82SSimon Schubert.\" 6f9366a82SSimon Schubert.\" Redistribution and use in source and binary forms, with or without 7f9366a82SSimon Schubert.\" modification, are permitted provided that the following conditions 8f9366a82SSimon Schubert.\" are met: 9f9366a82SSimon Schubert.\" 10f9366a82SSimon Schubert.\" 1. Redistributions of source code must retain the above copyright 11f9366a82SSimon Schubert.\" notice, this list of conditions and the following disclaimer. 12f9366a82SSimon Schubert.\" 2. Redistributions in binary form must reproduce the above copyright 13f9366a82SSimon Schubert.\" notice, this list of conditions and the following disclaimer in 14f9366a82SSimon Schubert.\" the documentation and/or other materials provided with the 15f9366a82SSimon Schubert.\" distribution. 16f9366a82SSimon Schubert.\" 3. Neither the name of The DragonFly Project nor the names of its 17f9366a82SSimon Schubert.\" contributors may be used to endorse or promote products derived 18f9366a82SSimon Schubert.\" from this software without specific, prior written permission. 19f9366a82SSimon Schubert.\" 20f9366a82SSimon Schubert.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21f9366a82SSimon Schubert.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22f9366a82SSimon Schubert.\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23f9366a82SSimon Schubert.\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 24f9366a82SSimon Schubert.\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25f9366a82SSimon Schubert.\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, 26f9366a82SSimon Schubert.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27f9366a82SSimon Schubert.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 28f9366a82SSimon Schubert.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29f9366a82SSimon Schubert.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 30f9366a82SSimon Schubert.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31f9366a82SSimon Schubert.\" SUCH DAMAGE. 32f9366a82SSimon Schubert.\" 33*d78fd03bSSascha Wildner.\" $DragonFly: src/lib/libc/sys/lwp_kill.2,v 1.2 2007/03/16 22:02:02 swildner Exp $ 34f9366a82SSimon Schubert.\" 35f9366a82SSimon Schubert.Dd March 12, 2007 36f9366a82SSimon Schubert.Dt LWP_KILL 2 37f9366a82SSimon Schubert.Os 38f9366a82SSimon Schubert.Sh NAME 39f9366a82SSimon Schubert.Nm lwp_kill 40f9366a82SSimon Schubert.Nd send signal to a lwp 41f9366a82SSimon Schubert.Sh LIBRARY 42f9366a82SSimon Schubert.Lb libc 43f9366a82SSimon Schubert.Sh SYNOPSIS 44f9366a82SSimon Schubert.In sys/types.h 45f9366a82SSimon Schubert.In signal.h 46f9366a82SSimon Schubert.Ft int 47f9366a82SSimon Schubert.Fn lwp_kill "pid_t pid" "lwpid_t tid" "int sig" 48f9366a82SSimon Schubert.Sh DESCRIPTION 49f9366a82SSimon SchubertThe 50f9366a82SSimon Schubert.Fn lwp_kill 51*d78fd03bSSascha Wildnerfunction sends the signal 52f9366a82SSimon Schubert.Fa sig 53f9366a82SSimon Schubertto the lwp specified by 54f9366a82SSimon Schubert.Fa pid 55f9366a82SSimon Schubertand 56f9366a82SSimon Schubert.Fa tid . 57f9366a82SSimon SchubertIf 58f9366a82SSimon Schubert.Fa pid 59*d78fd03bSSascha Wildneris -1, the signal will be sent to the current process. 60*d78fd03bSSascha WildnerPermission checking and signal behavior is exactly like in 61f9366a82SSimon Schubert.Xr kill 2 . 62f9366a82SSimon Schubert.Sh RETURN VALUES 63*d78fd03bSSascha Wildner.Rv -std 64f9366a82SSimon Schubert.Sh ERRORS 65f9366a82SSimon Schubert.Fn Lwp_kill 66f9366a82SSimon Schubertwill fail and no signal will be sent if: 67f9366a82SSimon Schubert.Bl -tag -width Er 68f9366a82SSimon Schubert.It Bq Er EINVAL 69*d78fd03bSSascha Wildner.Fa sig 70f9366a82SSimon Schubertis not a valid signal number. 71f9366a82SSimon Schubert.It Bq Er ESRCH 72*d78fd03bSSascha Wildnerno lwp corresponding to 73f9366a82SSimon Schubert.Fa pid 74f9366a82SSimon Schubertand 75*d78fd03bSSascha Wildner.Fa tid 76*d78fd03bSSascha Wildnercan be found. 77f9366a82SSimon Schubert.It Bq Er EPERM 78*d78fd03bSSascha Wildnerthe sending process is not the super-user and its effective 79f9366a82SSimon Schubertuser id does not match the effective user-id of the receiving process. 80f9366a82SSimon Schubert.El 81f9366a82SSimon Schubert.Sh SEE ALSO 82f9366a82SSimon Schubert.Xr kill 2 , 83f9366a82SSimon Schubert.Xr lwp_create 2 , 84f9366a82SSimon Schubert.Xr raise 3 , 85f9366a82SSimon Schubert.Sh HISTORY 86f9366a82SSimon SchubertThe 87f9366a82SSimon Schubert.Fn lwp_kill 88f9366a82SSimon Schubertfunction first appeared in 89f9366a82SSimon Schubert.Dx 1.9 . 90