OSDN Git Service

(split) Convert release and draft pages to UTF-8.
[linuxjm/LDP_man-pages.git] / release / 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 2010-09-12 "Linux" "Linux Programmer's Manual"
36 .SH 名前
37 sigpause \- ブロックされたシグナルをアトミックに解放して割り込みを待つ
38 .SH 書式
39 .nf
40 .B #include <signal.h>
41 .sp
42 .BI "int sigpause(int " sigmask ");  /* BSD */"
43 .sp
44 .BI "int sigpause(int " sig ");      /* System V / UNIX 95 */"
45 .fi
46 .SH 説明
47 この関数を使わないこと。
48 代わりに
49 .BR sigsuspend (2)
50 を使うこと。
51 .LP
52 関数
53 .BR sigpause ()
54 はシグナルを待つように設計されている。
55 この関数はプロセスのシグナルマスク (ブロックされたシグナルのセット) を変更し、
56 シグナルが到着するのを待つ。
57 シグナルが到着すると、シグナルマスクは元に戻される。
58 .SH 返り値
59 .BR sigpause ()
60 が返った場合、この関数はシグナルによって割り込まれている。
61 返り値は \-1 で、
62 .I errno
63
64 .B EINTR
65 に設定される。
66 .SH 準拠
67 System V 版の
68 .BR sigpause ()
69 は POSIX.1-2001 で標準化されている。
70 .SH 備考
71 .SS 歴史
72 この関数の古典的な BSD 版は 4.2BSD で登場した。
73 この関数はプロセスのシグナルマスクを
74 .I sigmask
75 に設定する。
76 UNIX 95 では BSD 版と互換性のない System V 版のこの関数が標準化された。
77 UNIX 95 版は、指定されたシグナル
78 .I sig
79 をプロセスのシグナルマスクから削除するだけである。
80 .\" __xpg_sigpause: UNIX 95, spec 1170, SVID, SVr4, XPG
81 同じ名前で互換性のない 2 つの関数があるという不幸な事態は、
82 .BR \%sigsuspend (2)
83 関数によって解消された。
84 この関数は
85 .RI ( int
86 の代わりに)
87 .B "sigset_t *"
88 引き数をとる。
89 .SS Linux での注意
90 Linux では、このルーチンは Sparc (sparc64) アーキテクチャでのみ
91 システムコールとなっている。
92
93 libc4 と libc5 には BSD 版しかない。
94
95 機能検査マクロ
96 .B _BSD_SOURCE
97 が定義され、
98 .BR _POSIX_SOURCE ,
99 .BR _POSIX_C_SOURCE ,
100 .BR _XOPEN_SOURCE ,
101 .BR _GNU_SOURCE ,
102 .B _SVID_SOURCE
103 のいずれも定義されていない場合、
104 glibc は BSD 版を使う。
105 それ以外の場合には、System V 版を使用する。
106 .\"
107 .\" BSD 版では、
108 .\" .RI 「 sigmask
109 .\" を 0 にして、どのシグナルもブロックされないようにする」
110 .\" というのがよく使われる。
111 .SH 関連項目
112 .BR kill (2),
113 .BR sigaction (2),
114 .BR sigprocmask (2),
115 .BR sigsuspend (2),
116 .BR sigblock (3),
117 .BR sigvec (3),
118 .BR feature_test_macros (7)