OSDN Git Service

53ced39cb79da3d1ffafc3d1cf0a0a52d8a35157
[linuxjm/LDP_man-pages.git] / release / man3 / pthread_kill.3
1 .\" Copyright (c) 2009 Linux Foundation, written by Michael Kerrisk
2 .\"     <mtk.manpages@gmail.com>
3 .\"
4 .\" %%%LICENSE_START(VERBATIM)
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein.  The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\" %%%LICENSE_END
25 .\"
26 .\"*******************************************************************
27 .\"
28 .\" This file was generated with po4a. Translate the source file.
29 .\"
30 .\"*******************************************************************
31 .TH PTHREAD_KILL 3 2012\-08\-19 Linux "Linux Programmer's Manual"
32 .SH 名前
33 pthread_kill \- スレッドにシグナルを送信する
34 .SH 書式
35 .nf
36 \fB#include <signal.h>\fP
37
38 \fBint pthread_kill(pthread_t \fP\fIthread\fP\fB, int \fP\fIsig\fP\fB);\fP
39 .fi
40 .sp
41 \fI\-pthread\fP を付けてコンパイルとリンクを行う。
42 .SH 説明
43 \fBpthread_kill\fP() 関数は、呼び出したスレッドと同じプロセスの
44 スレッド \fIthread\fP にシグナル \fIsig\fP を送信する。
45 シグナルは非同期に \fIthread\fP へ直接送られる。
46
47 \fIsig\fP が 0 の場合、シグナルは送信されないが、
48 エラーチェックだけは実行される。
49 これを使うと、スレッド ID が存在するかの確認を行うことができる。
50 .SH 返り値
51 成功すると、 \fBpthread_kill\fP() は 0 を返す。
52 エラーの場合、エラー番号を返し、シグナルの送信は行わない。
53 .SH エラー
54 .TP 
55 \fBEINVAL\fP
56 無効なシグナルが指定された。
57 .TP 
58 \fBESRCH\fP
59 ID が \fIthread\fP のスレッドが見つからなかった。
60 .SH 準拠
61 POSIX.1\-2001.
62 .SH 注意
63 シグナルの配送はプロセス全体で行われる。
64 シグナルハンドラが設定されている場合、
65 そのハンドラがスレッド \fIthread\fP で起動されるが、
66 シグナルの配送が "stop", "continue", "terminate" のいずれかの場合、
67 シグナルに対するアクションはプロセス全体に影響がある。
68 .SH 関連項目
69 \fBkill\fP(2), \fBsigaction\fP(2), \fBsigpending\fP(2), \fBpthread_self\fP(3),
70 \fBpthread_sigmask\fP(3), \fBraise\fP(3), \fBpthreads\fP(7), \fBsignal\fP(7)
71 .SH この文書について
72 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部
73 である。プロジェクトの説明とバグ報告に関する情報は
74 http://www.kernel.org/doc/man\-pages/ に書かれている。