2 .\" Copyright (c) 2005 by Michael Kerrisk <mtk.manpages@gmail.com>
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.
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.
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
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
24 .\" Japanese Version Copyright (c) 2005 Akihiro MOTOKI all rights reserved.
25 .\" Translated 2005-12-04, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
27 .TH SIGSET 3 2010-09-20 "Linux" "Linux Programmer's Manual"
30 .\"O sigset, sighold, sigrelse, sigignore \- System V signal API
31 sigset, sighold, sigrelse, sigignore \- System V 版シグナル API
34 .B #include <signal.h>
36 .B typedef void (*sighandler_t)(int);
38 .BI "sighandler_t sigset(int " sig ", sighandler_t " disp );
40 .BI "int sighold(int " sig );
42 .BI "int sigrelse(int " sig );
44 .BI "int sigignore(int " sig );
47 .\"O Feature Test Macro Requirements for glibc (see
48 .\"O .BR feature_test_macros (7)):
50 .RB ( feature_test_macros (7)
61 _XOPEN_SOURCE\ >=\ 500 ||
62 _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
67 .\"O These functions are provided in glibc as a compatibility interface
68 .\"O for programs that make use of the historical System V signal API.
69 .\"O This API is obsolete: new applications should use the POSIX signal API
70 .\"O .RB ( sigaction (2),
71 .\"O .BR sigprocmask (2),
73 これらの関数は、昔ながらの System V 版シグナル API を使用しているプログラム
74 に対して互換性のあるインタフェースを glibc で提供するものである。
75 この API は過去のものであり、新しいアプリケーションでは
83 .\"O function modifies the disposition of the signal
87 .\"O argument can be the address of a signal handler function,
88 .\"O or one of the following constants:
95 引き数には、シグナルハンドラ関数のアドレスか、
99 .\"O Reset the disposition of
114 .\"O to the process's signal mask, but leave the disposition of
125 .\"O specifies the address of a signal handler, then
127 .\"O is added to the process's signal mask during execution of the handler.
129 にシグナルハンドラのアドレスが指定された場合、
130 シグナルハンドラの実行中は、そのプロセスのシグナルマスクに
136 .\"O was specified as a value other than
140 .\"O is removed from the process's signal mask.
149 .\"O The dispositions for
153 .\"O cannot be changed.
164 .\"O to the calling process's signal mask.
173 .\"O function removes
175 .\"O from the calling process's signal mask.
178 は、呼び出し元プロセスのシグナルマスクから
183 .\"O .BR sigignore ()
184 .\"O function sets the disposition of
195 .\"O .SH RETURN VALUE
203 .\"O was blocked before the call,
204 .\"O or the signal's previous disposition
205 .\"O if it was not blocked before the call.
217 .\"O returns \-1, with
219 .\"O set to indicate the error.
225 .\"O (But see BUGS below.)
230 .\"O .BR sigrelse (),
232 .\"O .BR sigignore ()
233 .\"O functions return 0 on success; on error, these functions return \-1 and set
235 .\"O to indicate the error.
240 は成功すると 0 を返す。エラーの場合、\-1 を返し、
247 .\"O see the ERRORS under
248 .\"O .BR sigaction (2)
250 .\"O .BR sigprocmask (2).
262 .\"O see the ERRORS under
263 .\"O .BR sigprocmask (2).
272 .\"O .BR sigignore (),
273 .\"O see the errors under
274 .\"O .BR sigaction (2).
279 .\"O .SH "CONFORMING TO"
282 .\"O These functions are obsolete: do not use them in new programs.
283 これらの関数は廃止予定である。新しいプログラムでは使用しないこと。
284 .\"O POSIX.1-2008 marks
286 .\"O .BR sigignore (),
287 .\"O .BR sigpause (),
288 .\"O .BR sigrelse (),
291 .\"O as obsolete, recommending the use of
292 .\"O .BR sigaction (2),
293 .\"O .BR sigprocmask (2),
294 .\"O .BR pthread_sigmask (3),
296 .\"O .BR sigsuspend (2)
308 .BR pthread_sigmask (3),
313 .\"O These functions appeared in glibc version 2.1.
314 これらの関数は glibc 2.1 で登場した。
318 .\"O type is a GNU extension; it is only used on this page to make the
320 .\"O prototype more easily readable.
322 型は GNU による拡張であり、この man page で
324 のプロトタイプをより読みやすくするために使われているだけである。
328 .\"O function provides reliable signal handling semantics (as when calling
329 .\"O .BR sigaction (2)
341 .\"O On System V, the
343 .\"O function provides unreliable semantics (as when calling
344 .\"O .BR sigaction (2)
348 .\"O .IR "SA_RESETHAND | SA_NODEFER" ).
351 が提供する処理機構は信頼性のないものである
354 .IR "SA_RESETHAND | SA_NODEFER"
360 .\"O provides reliable semantics.
364 .\"O POSIX.1-2001 leaves these aspects of
372 .\"O for further details.
377 .\"O In order to wait for a signal,
378 .\"O BSD and System V both provided a function named
379 .\"O .BR sigpause (3),
380 .\"O but this function has a different argument on the two systems.
382 .\"O .BR sigpause (3)
384 BSD と System V のどちらのシステムでも
388 この関数の引き数は両方のシステムで異なる。
394 .\"O In versions of glibc before 2.2,
400 .\"O was specified as a value other than
402 2.2 より前のバージョンの glibc では、
410 .\"O In all versions of glibc up to and including 2.3.5,
412 .\"O does not correctly return the previous disposition of the signal
414 2.3.5 以前の全てのバージョンの glibc では、
416 が変更前のシグナルの動作を正しく返さない場合が 2つある。
421 .\"O then a successful
425 .\"O Instead, it should return the previous disposition of the signal
426 .\"O (unless the signal was blocked, in which case
428 .\"O should be returned).
438 正しくは、(シグナルがブロックされていなかった場合には)
443 .\"O Second, if the signal is currently blocked, then
444 .\"O the return value of a successful
448 .\"O Instead, the previous disposition of the signal is returned.
449 もう一つは、シグナルが現在ブロックされている場合には、
455 変更前のシグナルの動作が返されることである。
456 .\"O These problems have been fixed since glibc 2.5.
457 これらの問題は glibc 2.5 以降で修正されている。
458 .\" See http://sourceware.org/bugzilla/show_bug.cgi?id=1951