'\" te .\" Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. .\" Copyright (c) 2001, the Institute of Electrical and Electronics Engineers, Inc. and The Open Group. All Rights Reserved. .\" Copyright 1991, 1992, 1994, The X/Open Company Ltd. .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at http://www.opengroup.org/bookstore/. .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html. This notice shall appear on any product containing this material. .TH pthread_kill 3C "11 Jan 2012" "SunOS 5.11" "Standard C Library Functions" .SH NAME pthread_kill \- send a signal to a thread .SH SYNOPSIS .LP .nf cc -mt [ \fIflag\fR... ] \fIfile\fR... [ \fIlibrary\fR... ] #include #include \fBint\fR \fBpthread_kill\fR(\fBpthread_t\fR \fIthread\fR, \fBint\fR \fIsig\fR); .fi .SH DESCRIPTION .sp .LP The \fBpthread_kill()\fR function sends the \fIsig\fR signal to the thread designated by thread. The \fIthread\fR argument must be a member of the same process as the calling thread. The \fIsig\fR argument must be one of the signals listed in \fBsignal.h\fR(3HEAD), with the exception of \fBSIGCANCEL\fR being reserved and off limits to \fBpthread_kill()\fR. If \fIsig\fR is 0, a validity check is performed for the existence of the target thread; no signal is sent. .SH RETURN VALUES .sp .LP Upon successful completion, the function returns a value of \fB0\fR. Otherwise the function returns an error number. If the \fBpthread_kill()\fR function fails, no signal is sent. .SH ERRORS .sp .LP The \fBpthread_kill()\fR function will fail if: .sp .ne 2 .mk .na \fB\fBESRCH\fR\fR .ad .RS 10n .rt No thread could be found corresponding to that specified by the given thread \fBID.\fR .RE .sp .ne 2 .mk .na \fB\fBEINVAL\fR\fR .ad .RS 10n .rt The value of the \fIsig\fR argument is an invalid or unsupported signal number. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelMT-Safe _ StandardSee \fBstandards\fR(5). .TE .SH SEE ALSO .sp .LP \fBkill\fR(1), \fBpthread_self\fR(3C), \fBpthread_sigmask\fR(3C), \fBraise\fR(3C), \fBattributes\fR(5), \fBstandards\fR(5)