OSDN Git Service

(split) LDP_man-pages: update original to v3.35.
[linuxjm/LDP_man-pages.git] / release / man3 / sigqueue.3
1 .\" Copyright (c) 2002 Michael Kerrisk <mtk.manpages@gmail.com>
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" added note on self-signaling, aeb, 2002-06-07
24 .\" added note on CAP_KILL, mtk, 2004-06-16
25 .\"
26 .\" Japanese Version Copyright (c) 2002, 2005 Yuichi SATO
27 .\"         all rights reserved.
28 .\" Translated 2002-08-06, Yuichi SATO <ysato@h4.dion.ne.jp>
29 .\" Updated & Modified 2005-01-08, Yuichi SATO <ysato444@yahoo.co.jp>
30 .\" Updated 2007-09-08, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.64
31 .\"
32 .TH SIGQUEUE 3 2011-09-18 "Linux" "Linux Programmer's Manual"
33 .SH Ì¾Á°
34 sigqueue, rt_sigqueueinfo \- ¥·¥°¥Ê¥ë¤È¥Ç¡¼¥¿¤ò¥×¥í¥»¥¹¤ËÁ÷¤ë
35 .SH ½ñ¼°
36 .B #include <signal.h>
37 .sp
38 .BI "int sigqueue(pid_t " pid ", int " sig ", const union sigval " value );
39 .sp
40 .in -4n
41 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
42 .RB ( feature_test_macros (7)
43 »²¾È):
44 .in
45 .sp
46 .BR sigqueue ():
47 _POSIX_C_SOURCE\ >=\ 199309L
48 .SH ÀâÌÀ
49 .BR sigqueue ()
50 ¤Ï
51 .I sig
52 ¤Ç»ØÄꤵ¤ì¤¿¥·¥°¥Ê¥ë¤ò¡¢PID ¤¬
53 .I pid
54 ¤Ç¤¢¤ë¥×¥í¥»¥¹¤ËÁ÷¤ë¡£
55 ¥·¥°¥Ê¥ë¤òÁ÷¤ë¤Î¤ËɬÍפʸ¢¸Â¤Ï
56 .BR kill (2)
57 ¤ÈƱ¤¸¤Ç¤¢¤ë¡£
58 .BR kill (2)
59 ¤ÈƱÍͤˡ¢¥Ì¥ë¡¦¥·¥°¥Ê¥ë (0) ¤ò»È¤Ã¤Æ
60 »ØÄꤷ¤¿ PID ¤Î¥×¥í¥»¥¹¤¬Â¸ºß¤¹¤ë¤«¤ò¥Á¥§¥Ã¥¯¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
61 .PP
62 .I value
63 °ú¤­¿ô¤Ï¥·¥°¥Ê¥ë¤È°ì½ï¤ËÁ÷¤ë¥Ç¡¼¥¿¤ÎÉÕ°¥¢¥¤¥Æ¥à¤ò»ØÄꤹ¤ë¡£
64 .I value
65 ¤Ï (À°¿ô¤Þ¤¿¤Ï¥Ý¥¤¥ó¥¿¤ÎÃͤǤ¢¤ê) °Ê²¼¤Î¤è¤¦¤Ê·¿¤Ç¤¢¤ë¡£
66 .sp
67 .in +4n
68 .nf
69 union sigval {
70     int   sival_int;
71     void *sival_ptr;
72 };
73 .fi
74 .in
75
76 ¼õ¼èÀè¤Î¥×¥í¥»¥¹¤Ë¡¢¤³¤Î¥·¥°¥Ê¥ë¤ËÂФ¹¤ë¥Ï¥ó¥É¥é¤ò
77 .RB ( sigaction (2)
78 ¤Ë
79 .B SA_SIGINFO
80 ¤ò»ØÄꤷ¤Æ) ¥¤¥ó¥¹¥È¡¼¥ë¤·¤Æ¤ª¤¯¤È¡¢
81 ¤½¤Î¥Ï¥ó¥É¥é¤ÎÂè 2 °ú¤­¿ô¤ËÅϤµ¤ì¤ë
82 .I siginfo_t
83 ¹½Â¤ÂΤÎ
84 .I si_value
85 ¥Õ¥£¡¼¥ë¥É¤Ë¤è¤Ã¤Æ¡¢¤³¤Î¥Ç¡¼¥¿¤ò¼èÆÀ¤Ç¤­¤ë¡£
86 ¤µ¤é¤Ë¡¢¤³¤Î¹½Â¤ÂΤÎ
87 .I si_code
88 ¥Õ¥£¡¼¥ë¥É¤Ï
89 .B SI_QUEUE
90 ¤ËÀßÄꤵ¤ì¤ë¡£
91 .SH ÊÖ¤êÃÍ
92 À®¸ù¤·¤¿¾ì¹ç¡¢
93 .BR sigqueue ()
94 ¤Ï 0 ¤òÊÖ¤¹¡£
95 ¤³¤ì¤Ï¼õ¤±¼è¤ê¦¥×¥í¥»¥¹¤ÎÂÔ¤Á¹ÔÎó¤Ë
96 ¥·¥°¥Ê¥ë¤¬Àµ¤·¤¯Æþ¤ì¤é¤ì¤¿¤³¤È¤ò¼¨¤¹¡£
97 ¼ºÇÔ¤·¤¿¾ì¹ç¤Ï \-1 ¤¬ÊÖ¤µ¤ì¡¢
98 .I errno
99 ¤¬¥¨¥é¡¼¤òɽ¤¹ÃͤËÀßÄꤵ¤ì¤ë¡£
100 .SH ¥¨¥é¡¼
101 .TP
102 .B EAGAIN
103 ÂÔ¤Á¹ÔÎó¤ËÆþ¤ì¤é¤ì¤ë¥·¥°¥Ê¥ë¤ÎºÇÂç¿ô¤Ë㤷¤¿
104 (¤è¤ê¾Ü¤·¤¤¾ðÊó¤Ï
105 .BR signal (7)
106 ¤ò»²¾È¤¹¤ë¤³¤È)¡£
107 .TP
108 .B EINVAL
109 .I sig
110 ¤¬ÉÔÀµ¤Ç¤¢¤ë¡£
111 .TP
112 .B EPERM
113 ¤³¤Î¥×¥í¥»¥¹¤Ë¤Ï¡¢¼õ¤±¼è¤ê¦¥×¥í¥»¥¹¤Ë¥·¥°¥Ê¥ë¤òÁ÷¤ë¸¢¸Â¤¬¤Ê¤¤¡£
114 ɬÍפʸ¢¸Â¤Ë¤Ä¤¤¤Æ¤Ï¡¢
115 .BR kill (2)
116 ¤ò»²¾È¤¹¤ë¤³¤È¡£
117 .TP
118 .B ESRCH
119 .I pid
120 ¤Ë¥Þ¥Ã¥Á¤¹¤ë PID ¤Î¥×¥í¥»¥¹¤¬¤Ê¤¤¡£
121 .SH ¥Ð¡¼¥¸¥ç¥ó
122 ¤³¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï Linux 2.2 ¤Ç½é¤á¤ÆÅо줷¤¿¡£
123 .SH ½àµò
124 POSIX.1-2001.
125 .SH Ãí°Õ
126 ¤³¤Î´Ø¿ô¤ò¸Æ¤Ó½Ð¤·¤¿¥×¥í¥»¥¹¤Ë¤³¤Î´Ø¿ô¤¬¥·¥°¥Ê¥ë¤òÁ÷¤Ã¤¿¤È¤­¤Ë¡¢
127 ¥·¥°¥Ê¥ë¤¬¸Æ¤Ó½Ð¤·Â¦¥¹¥ì¥Ã¥É¤Ë¥Ö¥í¥Ã¥¯¤µ¤ì¤º¡¢
128 ¤«¤Ä (¥·¥°¥Ê¥ë¤¬¥Ö¥í¥Ã¥¯¤µ¤ì¤Ê¤«¤Ã¤¿¡¢¤Þ¤¿¤Ï
129 .BR sigwait (3)
130 ¤ò»ÈÍѤ¹¤ë¤Î¤òÂԤäƤ¤¤ë¤³¤È¤Ë¤è¤ê)
131 ¤³¤Î¥·¥°¥Ê¥ë¤ò°·¤¦¥¹¥ì¥Ã¥É¤¬²¿¤â¤Ê¤¤¾ì¹ç¤Ï¡¢
132 ¤³¤Î´Ø¿ô¤¬¥ê¥¿¡¼¥ó¤¹¤ëÁ°¤Ë¡¢¾¯¤Ê¤¯¤È¤â
133 ¤½¤Î¥¹¥ì¥Ã¥É¤ËÂФ·¤Æ¥·¥°¥Ê¥ë¤¬ÇÛÁ÷¤µ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
134
135 Linux ¤Ç¤Ï¡¢¤³¤Î´Ø¿ô¤Ï
136 .BR rt_sigqueueinfo (2)
137 ¥·¥¹¥Æ¥à¥³¡¼¥ë¤ò»È¤Ã¤Æ¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¡£
138 ξ¼Ô¤Ë¤Ï 3 ÈÖÌܤΰú¤­¿ô¤Ë°ã¤¤¤¬¤¢¤ê¡¢
139 .BR rt_sigqueueinfo (2)
140 ¤Ç¤Ï 3 ÈÖÌܤΰú¤­¿ô¤Ï
141 .I siginfo_t
142 ¹½Â¤ÂΤǤ¢¤ë¡£
143 .I siginfo_t
144 ¹½Â¤ÂΤϡ¢¥·¥°¥Ê¥ë¤ò¼õ¿®¤¹¤ë¥×¥í¥»¥¹¤Î¥·¥°¥Ê¥ë¥Ï¥ó¥É¥é¤ËÅϤµ¤ì¤¿¤ê¡¢
145 ¥·¥°¥Ê¥ë¼õ¿®¥×¥í¥»¥¹¤Î
146 .BR sigtimedwait (2)
147 ¥·¥¹¥Æ¥à¥³¡¼¥ë¤«¤éÊÖ¤µ¤ì¤¿¤ê¤¹¤ë¡£
148 glibc ¤Î
149 .BR sigqueue ()
150 ¥é¥Ã¥Ñ¡¼´Ø¿ôÆâÉô¤Ç¤Ï¡¢
151 ¤³¤Î°ú¤­¿ô
152 .I uinfo
153 ¤Ï°Ê²¼¤Î¤è¤¦¤Ë½é´ü²½¤µ¤ì¤ë¡£
154 .in +4n
155 .nf
156
157 uinfo.si_signo = sig;      /* argument supplied to sigqueue() */
158 uinfo.si_code = SI_QUEUE;
159 uinfo.si_pid = getpid();   /* Process ID of sender */
160 uinfo.si_uid = getuid();   /* Real UID of sender */
161 uinfo.si_value = val;      /* argument supplied to sigqueue() */
162 .fi
163 .in
164 .SH ´ØÏ¢¹àÌÜ
165 .BR kill (2),
166 .BR rt_sigqueueinfo (2),
167 .BR sigaction (2),
168 .BR signal (2),
169 .BR pthread_sigqueue (3),
170 .BR sigwait (3),
171 .BR signal (7)