xref: /openbsd-src/lib/libpthread/man/pthread_kill.3 (revision 86f9d4cdda0e0267dccd8755ac0035525579c4a7)
1*86f9d4cdStedu.\" $OpenBSD: pthread_kill.3,v 1.3 2013/06/05 03:44:50 tedu Exp $
20dda3bd0Sfgsch.\"
30dda3bd0Sfgsch.\" Copyright (C) 2000 Jason Evans <jasone@FreeBSD.org>.
40dda3bd0Sfgsch.\" All rights reserved.
50dda3bd0Sfgsch.\"
60dda3bd0Sfgsch.\" Redistribution and use in source and binary forms, with or without
70dda3bd0Sfgsch.\" modification, are permitted provided that the following conditions
80dda3bd0Sfgsch.\" are met:
90dda3bd0Sfgsch.\" 1. Redistributions of source code must retain the above copyright
100dda3bd0Sfgsch.\"    notice(s), this list of conditions and the following disclaimer as
110dda3bd0Sfgsch.\"    the first lines of this file unmodified other than the possible
120dda3bd0Sfgsch.\"    addition of one or more copyright notices.
130dda3bd0Sfgsch.\" 2. Redistributions in binary form must reproduce the above copyright
140dda3bd0Sfgsch.\"    notice(s), this list of conditions and the following disclaimer in
150dda3bd0Sfgsch.\"    the documentation and/or other materials provided with the
160dda3bd0Sfgsch.\"    distribution.
170dda3bd0Sfgsch.\"
180dda3bd0Sfgsch.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY
190dda3bd0Sfgsch.\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
200dda3bd0Sfgsch.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
210dda3bd0Sfgsch.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE
220dda3bd0Sfgsch.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
230dda3bd0Sfgsch.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
240dda3bd0Sfgsch.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
250dda3bd0Sfgsch.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
260dda3bd0Sfgsch.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
270dda3bd0Sfgsch.\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
280dda3bd0Sfgsch.\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
290dda3bd0Sfgsch.\"
300dda3bd0Sfgsch.\" $FreeBSD: src/lib/libc_r/man/pthread_kill.3,v 1.8 2001/10/01 16:09:09 ru Exp $
31*86f9d4cdStedu.Dd $Mdocdate: June 5 2013 $
320dda3bd0Sfgsch.Dt PTHREAD_KILL 3
330dda3bd0Sfgsch.Os
340dda3bd0Sfgsch.Sh NAME
350dda3bd0Sfgsch.Nm pthread_kill
360dda3bd0Sfgsch.Nd send a signal to a specified thread
370dda3bd0Sfgsch.Sh SYNOPSIS
38*86f9d4cdStedu.In pthread.h
39*86f9d4cdStedu.In signal.h
400dda3bd0Sfgsch.Ft int
410dda3bd0Sfgsch.Fn pthread_kill "pthread_t thread" "int sig"
420dda3bd0Sfgsch.Sh DESCRIPTION
430dda3bd0SfgschThe
440dda3bd0Sfgsch.Fn pthread_kill
450dda3bd0Sfgschfunction sends a signal, specified by
460dda3bd0Sfgsch.Fa sig ,
470dda3bd0Sfgschto a thread, specified by
480dda3bd0Sfgsch.Fa thread .
490dda3bd0SfgschIf
500dda3bd0Sfgsch.Fa sig
510dda3bd0Sfgschis 0, error checking is performed, but no signal is actually sent.
520dda3bd0Sfgsch.Sh RETURN VALUES
530dda3bd0SfgschIf successful,
540dda3bd0Sfgsch.Fn pthread_kill
550dda3bd0Sfgschreturns 0.
560dda3bd0SfgschOtherwise, an error number is returned.
570dda3bd0Sfgsch.Sh ERRORS
580dda3bd0Sfgsch.Fn pthread_kill
590dda3bd0Sfgschwill fail if:
600dda3bd0Sfgsch.Bl -tag -width Er
610dda3bd0Sfgsch.It Bq Er ESRCH
620dda3bd0Sfgsch.Fa thread
630dda3bd0Sfgschis an invalid thread ID.
640dda3bd0Sfgsch.It Bq Er EINVAL
650dda3bd0Sfgsch.Fa sig
660dda3bd0Sfgschis an invalid or unsupported signal number.
670dda3bd0Sfgsch.El
680dda3bd0Sfgsch.Sh SEE ALSO
690dda3bd0Sfgsch.Xr kill 2 ,
700dda3bd0Sfgsch.Xr pthread_self 3 ,
710dda3bd0Sfgsch.Xr raise 3
720dda3bd0Sfgsch.Sh STANDARDS
730dda3bd0Sfgsch.Fn pthread_kill
740dda3bd0Sfgschconforms to
750dda3bd0Sfgsch.St -p1003.1-96
76