1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262
|
'\" t
.\" Copyright (c) 2005 by Michael Kerrisk <mtk-manpages@gmx.net>
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one.
.\"
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date. The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.\" Japanese Version Copyright (c) 2005 Akihiro MOTOKI all rights reserved.
.\" Translated 2005-12-04, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
.\"
.TH SIGSET 3 2005-12-01 "Linux 2.6.14" "Linux Programmer's Manual"
.SH ̾
sigset, sighold, sigrelse, sigignore \- System V ǥʥ API
.SH
.B #define _XOPEN_SOURCE 500
.br
.B #include <signal.h>
.sp
.B typedef void (*sighandler_t)(int);
.sp
.BI "sighandler_t sigset(int " sig ", sighandler_t " disp );
.sp
.BI "int sighold(int " sig );
.sp
.BI "int sigrelse(int " sig );
.sp
.BI "int sigignore(int " sig );
.SH
δؿϡΤʤ System V ǥʥ API ѤƤץ
ФƸߴΤ륤ե glibc ΤǤ롣
API ϲΤΤǤꡢץꥱǤ
POSIX ʥ API
.RB ( sigaction (2),
.BR sigprocmask (2)
ʤ) Ѥ٤Ǥ롣
ؿ
.BR sigset ()
ϥʥ
.I sig
Υʥϥɥưѹ롣
.I disp
ˤϡʥϥɥؿΥɥ쥹
ʲΤ줫ĤǤ롣
.TP
.BR SIG_DFL
.I sig
ưǥեȤ˥ꥻåȤ롣
.TP
.BR SIG_IGN
.I sig
̵뤹롣
.TP
.BR SIG_HOLD
ΥץΥʥޥ
.I sig
ɲä뤬
.I sig
ưѹʤ
.PP
.I disp
˥ʥϥɥΥɥ쥹ꤵ줿硢
ʥϥɥμ¹ϡΥץΥʥޥ
.I sig
ɲä롣
.PP
.I disp
.B SIG_HOLD
ʳͤꤵ줿硢
ΥץΥʥޥ
.I sig
롣
.PP
ʥ
.B SIGKILL
.B SIGSTOP
ФưѹǤʤ
.PP
ؿ
.BR sighold ()
ϡƤӽФץΥʥޥ
.I sig
ɲä롣
ؿ
.BR sigrelse ()
ϡƤӽФץΥʥޥ
.I sig
롣
ؿ
.BR sigignore ()
ϡ
.I sig
ư
.B SIG_IGN
ꤹ롣
.SH ֤
.BR sigset ()
ȡ
ƤӽФ
.I sig
֥åƤˤ
.B SIG_HOLD
֤
֥åƤʤäˤ
ѹΤΥʥư֤
顼ξ硢
.BR sigset ()
\-1 ֤
.I errno
˥顼ͤåȤ롣
.\" FIXME But as at 2.3.5, glibc's sigset() is broken for the
.\" SIG_HOLD case: it will only return SIG_HOLD if 'disp' is
.\" SIG_HOLD; if the signal is blocked, then sigset() should return
.\" SIG_HOLD even if 'disp' is specified as something other than
.\" SIG_HOLD (I have tested this on Solaris 8 and HP-UX 11).
.\" -- mtk, 29 Nov 05
.\" See http://sourceware.org/bugzilla/show_bug.cgi?id=1951
.\" 24 Apr 06: According to Ulrich Drepper the problem is now fixed.
.\" 4 Jul 06: Looking at the 20060626 glibc tree, the problem is fixed,
.\" but the fix is not yet in a 2.4.x release.
ؿ
.BR sighold (),
.BR sigrelse (),
.BR sigignore ()
0 ֤顼ξ硢\-1 ֤
.I errno
˥顼ͤåȤ롣
.SH 顼
.BR sigset ()
˴ؤƤϡ
.BR sigaction (2)
.BR sigprocmask (2)
Ρ֥顼פȡ
.BR sighold ()
.BR sigrelse ()
˴ؤƤϡ
.BR sigprocmask (2)
Ρ֥顼פȡ
.BR sigignore ()
˴ؤƤϡ
.BR sigaction (2)
Ρ֥顼פȡ
.SH
δؿ glibc 2.1 о줷
.I sighandler_t
GNU ˤĥǤꡢ man page
.BR sigset ()
Υץȥפɤߤ䤹뤿˻ȤƤǤ롣
ؿ
.BR sigset ()
ϿΤ륷ʥ
.RI ( sa_mask
0
.BR sigaction ()
ƤӽФȤƱ)
System V Ǥϡؿ
.BR signal ()
ϿΤʤΤǤ
.RI ( sa_mask
.IR "SA_RESETHAND | SA_NODEFER"
Ȥ
.BR sigaction ()
ƤӽФȤƱ)
BSD Ǥϡ
.BR signal ()
ϿΤ롣
POSIX.1-2001 Ǥϡ
.BR signal ()
ΤϵꤷʤޤޤȤʤäƤ롣
ʤܺ٤ˤĤƤ
.BR signal (2)
ȡ
BSD System V ΤɤΥƥǤ
ʥԤĤˡ
.BR sigpause ()
Ȥ̾δؿƤ뤬
δؿΰξΥƥǰۤʤ롣
ܺ٤
.BR sigpause (3)
ȡ
.SH Х
2.2 ΥС glibc Ǥϡ
.I disp
.B SIG_HOLD
ʳͤꤵ줿硢
.I sig
Υ֥åԤäƤʤä
2.3.5 ƤΥС glibc Ǥϡ
.BR sigset ()
ѹΥʥư֤ʤ礬 2Ĥ롣
Ĥϡ
.I disp
.B SIG_HOLD
ꤵȡ
.BR sigset ()
Ͼ
.B SIG_HOLD
֤ȤǤ롣
ϡ(ʥ뤬֥åƤʤäˤ)
ѹΥʥư֤٤Ǥ
(ʥ뤬֥åƤˤϡ
.B SIG_HOLD
֤)
⤦Ĥϡʥ뤬ߥ֥åƤˤϡ
.BR sigset ()
֤ͤ
.B SIG_HOLD
ˤʤ٤Ǥ뤬ºݤˤ
ѹΥʥư֤뤳ȤǤ롣
.\"FIXME This has been reported on 30 Nov 05 -- mtk
.\" See http://sourceware.org/bugzilla/show_bug.cgi?id=1951
.\"
.\" The POSIX.1-2001 disposition of sigset() says:
.\" Upon successful completion, sigset() shall return
.\" SIG_HOLD if the signal had been blocked and the signal's
.\" previous disposition if it had not been blocked.
.\" Otherwise, SIG_ERR shall be returned and errno set to
.\" indicate the error.
.SH
SVr4, POSIX.1-2001.
δؿѻͽǤ롣ץǤϻѤʤȡ
.SH Ϣ
.BR kill (2),
.BR pause (2),
.BR sigaction (2),
.BR signal (2),
.BR sigprocmask (2),
.BR raise (3),
.BR sigpause (3),
.BR sigvec (3),
.BR signal (7)
|