OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man3 / sigwait.3
1 .\" Copyright (c) 2008, Linux Foundation, written by Michael Kerrisk
2 .\"     <mtk.manpages@gmail.com>
3 .\"
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\"
24 .\" Japanese Version Copyright (c) 2008  Akihiro MOTOKI
25 .\"         all rights reserved.
26 .\" Translated 2008-08-21, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.04
27 .\" 
28 .TH SIGWAIT 3 2009-02-10 "Linux" "Linux Programmer's Manual"
29 .\"O .SH NAME
30 .SH Ì¾Á°
31 .\"O sigwait \- wait for a signal
32 sigwait \- ¥·¥°¥Ê¥ë¤òÂÔ¤Ä
33 .\"O .SH SYNOPSIS
34 .SH ½ñ¼°
35 .nf
36 .B #include <signal.h>
37
38 .BI " int sigwait(const sigset_t *" set ", int *" sig );
39 .fi
40 .sp
41 .in -4n
42 .\"O Feature Test Macro Requirements for glibc (see
43 .\"O .BR feature_test_macros (7)):
44 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
45 .RB ( feature_test_macros (7)
46 »²¾È):
47 .in
48 .sp
49 .ad l
50 .BR sigwait ():
51 _POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE
52 .ad b
53 .\"O .SH DESCRIPTION
54 .SH ÀâÌÀ
55 .\"O The
56 .\"O .BR sigwait ()
57 .\"O function suspends execution of the calling thread until the
58 .\"O delivery of one of the signals specified in the signal set
59 .\"O .IR set .
60 .\"O The function accepts the signal
61 .\"O (removes it from the pending list of signals),
62 .\"O and returns the signal number in
63 .\"O .IR sig .
64 .BR sigwait ()
65 ´Ø¿ô¤Ï¡¢¥·¥°¥Ê¥ë½¸¹ç
66 .I set
67 ¤Ç»ØÄꤵ¤ì¤¿¥·¥°¥Ê¥ë¤Î°ì¤Ä¤¬ÇÛÁ÷¤µ¤ì¤ë¤Þ¤Ç¡¢
68 ¸Æ¤Ó½Ð¤·¤¿¥¹¥ì¥Ã¥É¤Î¼Â¹Ô¤òÃæÃǤ¹¤ë¡£
69 ¤³¤Î´Ø¿ô¤Ï¤½¤Î¥·¥°¥Ê¥ë¤ò¼õ¤±¼è¤ê (¤Ä¤Þ¤ê¡¢½èÍýÂÔ¤Á¤Î¥·¥°¥Ê¥ë¤Î¥ê¥¹¥È
70 ¤«¤é¤½¤Î¥·¥°¥Ê¥ë¤òºï½ü¤·)¡¢¤½¤Î¥·¥°¥Ê¥ëÈÖ¹æ¤ò
71 .I sig
72 ¤Ë³ÊǼ¤·¤ÆÊÖ¤¹¡£
73
74 .\"O The operation of
75 .\"O .BR sigwait ()
76 .\"O is the same as
77 .\"O .BR sigwaitinfo (),
78 .\"O except that:
79 .BR sigwait ()
80 ¤ÎÆ°ºî¤Ï
81 .BR sigwaitinfo ()
82 ¤ÈƱ¤¸¤À¤¬¡¢°Ê²¼¤ÎÅÀ¤¬°Û¤Ê¤ë¡£
83 .IP * 2
84 .\"O .BR sigwait ()
85 .\"O only returns the signal number, rather than a
86 .\"O .I siginfo_t
87 .\"O structure describing the signal.
88 .BR sigwait ()
89 ¤Ï¡¢¥·¥°¥Ê¥ë¤ÎÆâÍƤòɽ¤¹
90 .I siginfo_t
91 ¹½Â¤ÂΤòÊÖ¤¹¤Î¤Ç¤Ï¤Ê¤¯¡¢Ã±¤Ë¥·¥°¥Ê¥ëÈÖ¹æ¤òÊÖ¤¹¡£
92 .IP *
93 .\"O The return values of the two functions are different.
94 ÊÖ¤êÃͤ¬
95 .BR sigwaitinfo ()
96 ¤È¤Ï°Û¤Ê¤ë¡£
97 .\"O .SH RETURN VALUE
98 .SH ÊÖ¤êÃÍ
99 .\"O On success,
100 .\"O .BR sigwait ()
101 .\"O returns 0.
102 .\"O On error, it returns a positive error number.
103 À®¸ù¤¹¤ë¤È¡¢
104 .BR sigwait ()
105 ¤Ï 0 ¤òÊÖ¤¹¡£
106 ¥¨¥é¡¼¤Î¾ì¹ç¡¢Ä¾Á°¤Î¥¨¥é¡¼ÈÖ¹æ¤òÊÖ¤¹¡£
107 .\"O .SH ERRORS
108 .SH ¥¨¥é¡¼
109 .TP
110 .B EINVAL
111 .\" Does not occur for glibc.
112 .\"O .I set
113 .\"O contains an invalid signal number.
114 .I set
115 ¤Ë̵¸ú¤Ê¥·¥°¥Ê¥ëÈֹ椬Æþ¤Ã¤Æ¤¤¤ë¡£
116 .\"O .SH CONFORMING TO
117 .SH ½àµò
118 POSIX.1-2001.
119 .\"O .SH NOTES
120 .SH Ãí°Õ
121 .\"O .BR sigwait ()
122 .\"O is implemented using
123 .\"O .BR sigtimedwait (2).
124 .BR sigwait ()
125 ¤Ï
126 .BR sigtimedwait (2)
127 ¤ò»È¤Ã¤Æ¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¡£
128 .\"O .SH EXAMPLES
129 .SH Îã
130 .\"O See
131 .\"O .BR pthread_sigmask (3).
132 .BR pthread_sigmask (3)
133 ¤ò»²¾È¡£
134 .\"O .SH SEE ALSO
135 .SH ´ØÏ¢¹àÌÜ
136 .BR sigaction (2),
137 .BR signalfd (2),
138 .BR sigpending (2),
139 .BR sigsuspend (2),
140 .BR sigwaitinfo (2),
141 .BR sigsetops (3),
142 .BR signal (7)