OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man3 / sigpause.3
1 .\" Copyright (C) 2004 Andries Brouwer (aeb@cwi.nl)
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 .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
24 .\"         all rights reserved.
25 .\" Translated 1997-03-03, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
26 .\" Updated 2005-12-05, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
27 .\"   Catch up to LDP man-pages 2.16
28 .\"   Rename sigpause.2 to sigpause.3, and modified a little.
29 .\"
30 .\"WORD:        signal                  ¥·¥°¥Ê¥ë
31 .\"WORD:        interrupt               ³ä¤ê¹þ¤ß
32 .\"WORD:        mask                    ¥Þ¥¹¥¯
33 .\"WORD:        block                   ¥Ö¥í¥Ã¥¯¤¹¤ë
34 .\"
35 .TH SIGPAUSE 3 2005-12-01 "Linux" "Linux Programmer's Manual"
36 .\"O .SH NAME
37 .SH Ì¾Á°
38 .\"O sigpause \- atomically release blocked signals and wait for interrupt
39 sigpause \- ¥Ö¥í¥Ã¥¯¤µ¤ì¤¿¥·¥°¥Ê¥ë¤ò¥¢¥È¥ß¥Ã¥¯¤Ë²òÊü¤·¤Æ³ä¤ê¹þ¤ß¤òÂÔ¤Ä
40 .\"O .SH SYNOPSIS
41 .SH ½ñ¼°
42 .nf
43 .B #include <signal.h>
44 .sp
45 .BI "int sigpause(int " sigmask ");  /* BSD */"
46 .sp
47 .BI "int sigpause(int " sig ");      /* System V / Unix95 */"
48 .fi
49 .\"O .SH DESCRIPTION
50 .SH ÀâÌÀ
51 .\"O Don't use this function.
52 .\"O Use
53 .\"O .BR sigsuspend (2)
54 .\"O instead.
55 ¤³¤Î´Ø¿ô¤ò»È¤ï¤Ê¤¤¤³¤È¡£
56 Âå¤ï¤ê¤Ë
57 .BR sigsuspend (2)
58 ¤ò»È¤¦¤³¤È¡£
59 .LP
60 .\"O The function
61 .\"O .BR sigpause ()
62 .\"O is designed to wait for some signal.
63 ´Ø¿ô
64 .BR sigpause ()
65 ¤Ï¥·¥°¥Ê¥ë¤òÂԤĤ褦¤ËÀ߷פµ¤ì¤Æ¤¤¤ë¡£
66 .\"O It changes the process's signal mask (set of blocked signals),
67 .\"O and then waits for a signal to arrive.
68 .\"O Upon arrival of a signal, the original signal mask is restored.
69 ¤³¤Î´Ø¿ô¤Ï¥×¥í¥»¥¹¤Î¥·¥°¥Ê¥ë¥Þ¥¹¥¯ (¥Ö¥í¥Ã¥¯¤µ¤ì¤¿¥·¥°¥Ê¥ë¤Î¥»¥Ã¥È) ¤òÊѹ¹¤·¡¢
70 ¥·¥°¥Ê¥ë¤¬ÅþÃ夹¤ë¤Î¤òÂԤġ£
71 ¥·¥°¥Ê¥ë¤¬ÅþÃ夹¤ë¤È¡¢¥·¥°¥Ê¥ë¥Þ¥¹¥¯¤Ï¸µ¤ËÌᤵ¤ì¤ë¡£
72 .\"O .SH "RETURN VALUE"
73 .SH ÊÖ¤êÃÍ
74 .\"O If
75 .\"O .BR sigpause ()
76 .\"O returns, it was interrupted by a signal and the return value is \-1
77 .\"O with
78 .\"O .I errno
79 .\"O set to
80 .\"O .BR EINTR .
81 .BR sigpause ()
82 ¤¬Ê֤俾ì¹ç¡¢¤³¤Î´Ø¿ô¤Ï¥·¥°¥Ê¥ë¤Ë¤è¤Ã¤Æ³ä¤ê¹þ¤Þ¤ì¤Æ¤¤¤ë¡£
83 ÊÖ¤êÃͤϠ\-1 ¤Ç¡¢
84 .I errno
85 ¤Ï
86 .B EINTR
87 ¤ËÀßÄꤵ¤ì¤ë¡£
88 .\"O .SH CONFORMING TO
89 .SH ½àµò
90 .\"O The System V version of
91 .\"O .BR sigpause ()
92 .\"O is standardized in POSIX.1-2001.
93 System V ÈǤÎ
94 .BR sigpause ()
95 ¤Ï POSIX.1-2001 ¤Çɸ½à²½¤µ¤ì¤Æ¤¤¤ë¡£
96 .\"O .SH NOTES
97 .SH È÷¹Í
98 .\"O .SS History
99 .SS Îò»Ë
100 .\"O The classical BSD version of this function appeared in 4.2BSD.
101 .\"O It sets the process's signal mask to
102 .\"O .IR sigmask .
103 .\"O Unix95 standardized the incompatible System V version of
104 .\"O this function, which removes only the specified signal
105 .\"O .I sig
106 .\"O from the process's signal mask.
107 .\"O .\" __xpg_sigpause: Unix 95, spec 1170, SVID, SVr4, XPG
108 .\"O The unfortunate situation with two incompatible functions with the
109 .\"O same name was solved by the
110 .\"O .BR \%sigsuspend (2)
111 .\"O function, that takes a
112 .\"O .I "sigset_t *"
113 .\"O argument (instead of an
114 .\"O .IR int ).
115 ¤³¤Î´Ø¿ô¤Î¸ÅŵŪ¤Ê BSD ÈǤϠ4.2BSD ¤ÇÅо줷¤¿¡£
116 ¤³¤Î´Ø¿ô¤Ï¥×¥í¥»¥¹¤Î¥·¥°¥Ê¥ë¥Þ¥¹¥¯¤ò
117 .I sigmask
118 ¤ËÀßÄꤹ¤ë¡£
119 Unix95 ¤Ç¤Ï BSD ÈǤȸߴ¹À­¤Î¤Ê¤¤ System V ÈǤΤ³¤Î´Ø¿ô¤¬É¸½à²½¤µ¤ì¤¿¡£
120 Unix95 ÈǤϡ¢»ØÄꤵ¤ì¤¿¥·¥°¥Ê¥ë
121 .I sig
122 ¤ò¥×¥í¥»¥¹¤Î¥·¥°¥Ê¥ë¥Þ¥¹¥¯¤«¤éºï½ü¤¹¤ë¤À¤±¤Ç¤¢¤ë¡£
123 .\" __xpg_sigpause: Unix 95, spec 1170, SVID, SVr4, XPG
124 Ʊ¤¸Ì¾Á°¤Ç¸ß´¹À­¤Î¤Ê¤¤ 2 ¤Ä¤Î´Ø¿ô¤¬¤¢¤ë¤È¤¤¤¦ÉÔ¹¬¤Ê»öÂ֤ϡ¢
125 .BR \%sigsuspend (2)
126 ´Ø¿ô¤Ë¤è¤Ã¤Æ²ò¾Ã¤µ¤ì¤¿¡£
127 ¤³¤Î´Ø¿ô¤Ï
128 .RI ( int
129 ¤ÎÂå¤ï¤ê¤Ë)
130 .B "sigset_t *"
131 °ú¤­¿ô¤ò¤È¤ë¡£
132 .\"O .SS Linux Notes
133 .SS Linux ¤Ç¤ÎÃí°Õ
134 .\"O On Linux, this routine is a system call only on the Sparc (sparc64)
135 .\"O architecture.
136 Linux ¤Ç¤Ï¡¢¤³¤Î¥ë¡¼¥Á¥ó¤Ï Sparc (sparc64) ¥¢¡¼¥­¥Æ¥¯¥Á¥ã¤Ç¤Î¤ß
137 ¥·¥¹¥Æ¥à¥³¡¼¥ë¤È¤Ê¤Ã¤Æ¤¤¤ë¡£
138
139 .\"O Libc4 and libc5 only know about the BSD version.
140 libc4 ¤È libc5 ¤Ë¤Ï BSD ÈǤ·¤«¤Ê¤¤¡£
141
142 .\"O Glibc uses the BSD version if the
143 .\"O .B _BSD_SOURCE
144 .\"O feature test macro is defined and none of
145 .\"O .BR _POSIX_SOURCE ,
146 .\"O .BR _POSIX_C_SOURCE ,
147 .\"O .BR _XOPEN_SOURCE ,
148 .\"O .BR _GNU_SOURCE ,
149 .\"O or
150 .\"O .B _SVID_SOURCE
151 .\"O is defined.
152 .\"O The System V version is used if
153 .\"O .B _XOPEN_SOURCE
154 .\"O is defined.
155 µ¡Ç½¸¡ºº¥Þ¥¯¥í
156 .B _BSD_SOURCE
157 ¤¬ÄêµÁ¤µ¤ì¡¢
158 .BR _POSIX_SOURCE ,
159 .BR _POSIX_C_SOURCE ,
160 .BR _XOPEN_SOURCE ,
161 .BR _GNU_SOURCE ,
162 .B _SVID_SOURCE
163 ¤Î¤¤¤º¤ì¤âÄêµÁ¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¡¢
164 glibc ¤Ï BSD ÈǤò»È¤¦¡£
165 .B _XOPEN_SOURCE
166 ¤¬ÄêµÁ¤µ¤ì¤¿¾ì¹ç¡¢System V ÈǤò»ÈÍѤ¹¤ë¡£
167 .\"
168 .\"O .\" For the BSD version, one usually uses a zero
169 .\"O .\" .I sigmask
170 .\"O .\" to indicate that no signals are to be blocked.
171 .\" BSD ÈǤǤϡ¢
172 .\" .RI ¡Ö sigmask
173 .\" ¤ò 0 ¤Ë¤·¤Æ¡¢¤É¤Î¥·¥°¥Ê¥ë¤â¥Ö¥í¥Ã¥¯¤µ¤ì¤Ê¤¤¤è¤¦¤Ë¤¹¤ë¡×
174 .\" ¤È¤¤¤¦¤Î¤¬¤è¤¯»È¤ï¤ì¤ë¡£
175 .\"O .SH "SEE ALSO"
176 .SH ´ØÏ¢¹àÌÜ
177 .BR kill (2),
178 .BR sigaction (2),
179 .BR sigprocmask (2),
180 .BR sigsuspend (2),
181 .BR sigblock (3),
182 .BR sigvec (3),
183 .BR feature_test_macros (7)