OSDN Git Service

2e047b529fb71fe9f2c5a5f8771359ed8e42fa98
[linuxjm/LDP_man-pages.git] / release / man2 / killpg.2
1 .\" Copyright (c) 1980, 1991 Regents of the University of California.
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by the University of
15 .\"     California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     @(#)killpg.2    6.5 (Berkeley) 3/10/91
33 .\"
34 .\" Modified Fri Jul 23 21:55:01 1993 by Rik Faith <faith@cs.unc.edu>
35 .\" Modified Tue Oct 22 08:11:14 EDT 1996 by Eric S. Raymond <esr@thyrsus.com>
36 .\" Modified 2004-06-16 by Michael Kerrisk <mtk.manpages@gmail.com>
37 .\"     Added notes on CAP_KILL
38 .\" Modified 2004-06-21 by aeb
39 .\"
40 .\" Japanese Version Copyright (c) 1997 Kazuyuki Tanisako
41 .\"         all rights reserved.
42 .\" Translated Sat May 17 14:10:42 JST 1997
43 .\"         by Kazuyuki Tanisako <tanisako@osa.dec-j.co.jp>
44 .\" Updated & Modified Sat Feb  5 21:24:32 JST 2005
45 .\"         by Yuichi SATO <ysato444@yahoo.co.jp>
46 .\"
47 .\"WORD:        process group           ¥×¥í¥»¥¹¡¦¥°¥ë¡¼¥×
48 .\"WORD:        signal                  ¥·¥°¥Ê¥ë
49 .\"WORD:        effective user ID       ¼Â¸ú¥æ¡¼¥¶¡¼ID
50 .\"WORD:        super-user              ¥¹¡¼¥Ñ¡¼¡¦¥æ¡¼¥¶¡¼
51 .\"
52 .TH KILLPG 2 2010-09-20 "Linux" "Linux Programmer's Manual"
53 .SH Ì¾Á°
54 killpg \- ¥·¥°¥Ê¥ë¤ò¥×¥í¥»¥¹¡¦¥°¥ë¡¼¥×¤ËÁ÷¤ë
55 .SH ½ñ¼°
56 .B #include <signal.h>
57 .sp
58 .BI "int killpg(int " pgrp ", int " sig );
59 .sp
60 .in -4n
61 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
62 .RB ( feature_test_macros (7)
63 »²¾È):
64 .in
65 .sp
66 .ad l
67 .TP 4
68 .BR killpg ():
69 _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 ||
70 _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
71 .ad
72 .SH ÀâÌÀ
73 .BR killpg ()
74 ¤Ï
75 .I sig
76 ¤Ç»ØÄꤷ¤¿¥·¥°¥Ê¥ë¤ò
77 .I pgrp
78 ¤Ç»ØÄꤷ¤¿¥×¥í¥»¥¹¡¦¥°¥ë¡¼¥×¤ËÁ÷¤ë¡£
79 ¥·¥°¥Ê¥ë¤ÎÄêµÁ¤Î°ìÍ÷¤Ï
80 .BR signal (7)
81 ¤ò»²¾È¤Î¤³¤È¡£
82
83 °ú¤­¿ô
84 .I pgrp
85 ¤Ë 0 ¤ò»ØÄꤷ¤¿¾ì¹ç¤Ë¤Ï
86 .BR killpg ()
87 ¤Ï¸Æ¤Ó½Ð¤·¸µ¤Î¥×¥í¥»¥¹¤¬Â°¤·¤Æ¤¤¤ë¥×¥í¥»¥¹¡¦¥°¥ë¡¼¥×¤ËÂФ·¤Æ¥·¥°¥Ê¥ë¤òÁ÷¤ë¡£
88 (POSIX ¤Ç¤Ï°Ê²¼¤Î¤è¤¦¤Ëµ­½Ò¤µ¤ì¤Æ¤¤¤ë:
89 .I pgrp
90 ¤¬ 1 °Ê²¼¤Ç¤¢¤ë¾ì¹ç¡¢Æ°ºî¤Ï̤ÄêµÁ¤Ç¤¢¤ë¡£)
91
92 ¥×¥í¥»¥¹¤¬¥·¥°¥Ê¥ë¤òÁ÷¿®¤¹¤ëµö²Ä¤ò»ý¤Ä¤¿¤á¤Ë¤Ï¡¢
93 ¥×¥í¥»¥¹¤¬Æø¢ (Linux ¤Ç¤Ï
94 .B CAP_KILL
95 ¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£ (capability)) ¤ò»ý¤Ä¤«¡¢
96 Á÷¿®¸µ¥×¥í¥»¥¹¤Î¼Â¥æ¡¼¥¶¡¼ ID ¤Þ¤¿¤Ï¼Â¸ú¥æ¡¼¥¶¡¼ ID ¤¬
97 Á÷¿®Àè¥×¥í¥»¥¹¤Î¼Â set-user-ID ¤Þ¤¿¤ÏÊݸ set-user-ID ¤È
98 Åù¤·¤¯¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
99 .B SIGCONT
100 ¤Î¾ì¹ç¡¢Á÷¿®¥×¥í¥»¥¹¤È¼õ¿®¥×¥í¥»¥¹¤¬
101 Ʊ¤¸¥»¥Ã¥·¥ç¥ó¤Ë°¤·¤Æ¤¤¤ì¤Ð½½Ê¬¤Ç¤¢¤ë¡£
102 .SH ÊÖ¤êÃÍ
103 Àµ¾ï½ªÎ»¤¹¤ë¤È 0 ¤¬ÊÖ¤êÃͤȤʤ롣°Û¾ï½ªÎ»¤Î¾ì¹ç \-1 ¤¬ÊÖ¤êÃͤȤʤê
104 .I errno
105 ¤Ë¸¶°ø¥³¡¼¥É¤¬ÀßÄꤵ¤ì¤ë¡£
106 .SH ¥¨¥é¡¼
107 .TP
108 .B EINVAL
109 .I sig
110 ¤Ç»ØÄꤵ¤ì¤¿ÃͤÏ̵¸ú¤Ê¥·¥°¥Ê¥ëÈÖ¹æ¤Ç¤¢¤ë¡£
111 .TP
112 .B EPERM
113 ¥×¥í¥»¥¹¤Ë²¿¤ì¤«¤ÎÁ÷¿®Àè¥×¥í¥»¥¹¤Ë¥·¥°¥Ê¥ë¤òÁ÷¿®¤¹¤ëµö²Ä¤¬¤Ê¤¤¡£
114 .TP
115 .B ESRCH
116 .I pgrp
117 ¤Ç»ØÄꤵ¤ì¤¿¥×¥í¥»¥¹¡¦¥°¥ë¡¼¥×¤Ë°¤¹¤ë¥×¥í¥»¥¹¤¬Â¸ºß¤·¤Ê¤«¤Ã¤¿¡£
118 .TP
119 .B ESRCH
120 ¥×¥í¥»¥¹¡¦¥°¥ë¡¼¥×¤È¤·¤Æ 0 ¤¬»ØÄꤵ¤ì¤¿¤¬¡¢Á÷¿®¥×¥í¥»¥¹¤Ï
121 ¥×¥í¥»¥¹¡¦¥°¥ë¡¼¥×¤ò»ý¤Ã¤Æ¤¤¤Ê¤¤¡£
122 .SH ½àµò
123 SVr4, 4.4BSD
124 .RB ( killpg ()
125 ¤Ï 4BSD ¤Ç½é¤á¤ÆÄɲ䵤줿), POSIX.1-2001¡£
126 .SH Ãí°Õ
127 BSD ·Ï¥·¥¹¥Æ¥à¤È System V ·Ï¥·¥¹¥Æ¥à¤Ç¤Ï¡¢
128 µö²Ä¤Î¥Á¥§¥Ã¥¯¤ËÍÍ¡¹¤Ê°ã¤¤¤¬¤¢¤ë¡£
129 .BR kill (2)
130 ¤Ë¤Ä¤¤¤Æ¤Î POSIX ¤Î¸¶Íý (rationale) ¤ò»²¾È¤¹¤ë¤³¤È¡£
131 POSIX ¤Çµ­½Ò¤µ¤ì¤Æ¤¤¤Ê¤¤°ã¤¤¤È¤·¤Æ¤Ï¡¢ÊÖ¤êÃÍ
132 .B EPERM
133 ¤¬¤¢¤ë¡£
134 BSD ¤Ç¤Ï¡ÖÁ÷¿®Àè¥×¥í¥»¥¹¤Îµö²Ä¤Î¥Á¥§¥Ã¥¯¤¬ 1 ¤Ä¤Ç¤â¼ºÇÔ¤·¤¿¾ì¹ç¤Ï¡¢
135 ¥·¥°¥Ê¥ë¤¬Á÷¿®¤µ¤ì¤º¡¢
136 .B EPERM
137 ¤¬ÊÖ¤µ¤ì¤ë¡×¤Èµ­½Ò¤µ¤ì¤Æ¤¤¤ë¡£
138 POSIX ¤Ç¤Ï¡ÖÁ÷¿®Àè¥×¥í¥»¥¹¤Îµö²Ä¤Î¥Á¥§¥Ã¥¯¤¬Á´¤Æ¼ºÇÔ¤·¤¿¾ì¹ç¤Ë¤Î¤ß¡¢
139 .B EPERM
140 ¤¬ÊÖ¤µ¤ì¤ë¡×¤Èµ­½Ò¤µ¤ì¤Æ¤¤¤ë¡£
141
142 Linux ¤Ç¤Ï¡¢
143 .BR killpg ()
144 ¤Ï¥é¥¤¥Ö¥é¥ê´Ø¿ô¤È¤·¤Æ¼ÂÁõ¤µ¤ì¤Æ¤ª¤ê¡¢
145 .I "kill(-pgrp,\ sig)"
146 ¤Î¸Æ¤Ó½Ð¤·¤¬¹Ô¤ï¤ì¤ë¡£
147 .SH ´ØÏ¢¹àÌÜ
148 .BR getpgrp (2),
149 .BR kill (2),
150 .BR signal (2),
151 .BR credentials (7),
152 .BR capabilities (7)