OSDN Git Service

(split) LDP: draft snapshot generated from latest ja.po files.
[linuxjm/LDP_man-pages.git] / draft / man2 / tkill.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright (C) 2008 Michael Kerrisk <tmk.manpages@gmail.com>
4 .\" and Copyright 2003 Abhijit Menon-Sen <ams@wiw.org>
5 .\"
6 .\" Permission is granted to make and distribute verbatim copies of this
7 .\" manual provided the copyright notice and this permission notice are
8 .\" preserved on all copies.
9 .\"
10 .\" Permission is granted to copy and distribute modified versions of this
11 .\" manual under the conditions for verbatim copying, provided that the
12 .\" entire resulting derived work is distributed under the terms of a
13 .\" permission notice identical to this one.
14 .\"
15 .\" Since the Linux kernel and libraries are constantly changing, this
16 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
17 .\" responsibility for errors or omissions, or for damages resulting from
18 .\" the use of the information contained herein.  The author(s) may not
19 .\" have taken the same level of care in the production of this manual,
20 .\" which is licensed free of charge, as they might when working
21 .\" professionally.
22 .\"
23 .\" Formatted or processed versions of this manual, if unaccompanied by
24 .\" the source, must acknowledge the copyright and authors of this work.
25 .\"
26 .\" 2004-05-31, added tgkill, ahu, aeb
27 .\" 2008-01-15 mtk -- rewote DESCRIPTION
28 .\"
29 .\"*******************************************************************
30 .\"
31 .\" This file was generated with po4a. Translate the source file.
32 .\"
33 .\"*******************************************************************
34 .TH TKILL 2 2011\-09\-18 Linux "Linux Programmer's Manual"
35 .SH 名前
36 tkill, tgkill \- スレッドにシグナルを送る
37 .SH 書式
38 .nf
39 \fBint tkill(int \fP\fItid\fP\fB, int \fP\fIsig\fP\fB);\fP
40 .sp
41 \fBint tgkill(int \fP\fItgid\fP\fB, int \fP\fItid\fP\fB, int \fP\fIsig\fP\fB);\fP
42 .fi
43 .SH 説明
44 \fBtgkill\fP()  はスレッド・グループ \fItgid\fP に属するスレッド ID が \fItid\fP のスレッドにシグナル \fIsig\fP を送る。
45 (これに対し、 \fBkill\fP(2)  は一つのプロセス (すなわち、スレッド・グループ) にまとめてシグナルを 送るのにだけ利用できる。
46 \fBkill\fP(2)  で送信されたシグナルはプロセス内の任意のスレッドに配送される。)
47
48 \fBtkill\fP()  はもう使われなくなった \fBtgkill\fP()  の先祖である。 \fBtkill\fP()  ではシグナルの送り先のスレッド ID
49 しか指定できない。 そのため、スレッドが終了して、そのスレッド ID が再利用される場合に、 意図しないスレッドにシグナルが送られる可能性がある。
50 このシステムコールの使用は避けること。
51
52 \fItgid\fP に \-1 が指定された場合、 \fBtgkill\fP()  は \fBtkill\fP()  と等価である。
53
54 これらはシステムコールへの直接のインターフェースであり、 スレッド・ライブラリ内部での使用を意図したものである。
55 .SH 返り値
56 成功した場合、0 が返される。エラーが発生した場合、\-1 が返され、 \fIerrno\fP が適切に設定される。
57 .SH エラー
58 .TP 
59 \fBEINVAL\fP
60 指定されたスレッド ID、スレッドグループ ID、シグナルが不正であった。
61 .TP 
62 \fBEPERM\fP
63 許可がなかった。どのような許可が必要かについては、 \fBkill\fP(2)  を参照のこと。
64 .TP 
65 \fBESRCH\fP
66 指定されたスレッドID (とスレッド・グループID) を持つプロセスが存在しない。
67 .SH バージョン
68 \fBtkill\fP()  は Linux 2.4.19 / 2.5.4 以降でサポートされ、 \fBtgkill\fP()  は Linux 2.5.75
69 で追加された。
70 .SH 準拠
71 \fBtkill\fP()  と \fBtgkill\fP()  は Linux 固有であり、 移植を想定したプログラムでは使用すべきではない。
72 .SH 注意
73 スレッド・グループの説明については \fBclone\fP(2)  の \fBCLONE_THREAD\fP の説明を参照のこと。
74
75 glibc はこれらのシステムコールに対するラッパー関数を提供していない。 \fBsyscall\fP(2)  を使って呼び出すこと。
76 .SH 関連項目
77 \fBclone\fP(2), \fBgettid\fP(2), \fBkill\fP(2), \fBrt_sigqueueinfo\fP(2)