OSDN Git Service

(split) LDP: Update README.JM
[linuxjm/LDP_man-pages.git] / release / man2 / sigpause.2
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 Mon Mar  3 23:33:12 JST 1997
26 .\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
27 .\"
28 .\"WORD:        signal                  シグナル
29 .\"WORD:        interrupt               割り込み
30 .\"WORD:        mask                    マスク
31 .\"WORD:        block                   ブロックする
32 .\"
33 .TH SIGPAUSE 2 2004-05-10 "Linux 2.6" "Linux Programmer's Manual"
34 .SH 名前
35 sigpause \- ブロックされたシグナルをアトミックに解放 (release) して割り込み (interrupt) を待つ
36 .SH 書式
37 .nf
38 .B #include <signal.h>
39 .sp
40 .BI "int sigpause(int " sigmask ");  /* BSD */"
41 .sp
42 .BI "int sigpause(int " sig ");      /* Unix95 */"
43 .fi
44 .SH 説明
45 この関数を使わないこと。
46 代わりに
47 .BR sigsuspend (2)
48 を使うこと。
49 .LP
50 関数
51 .BR sigpause ()
52 はシグナルを待つように設計されている。
53 この関数はプロセスのシグナルマスク (ブロックされたシグナルのセット) を変更し、
54 シグナルが到着するのを待つ。
55 シグナルが到着すると、シグナルマスクは元に戻される。
56 .SH 返り値
57 .BR sigpause ()
58 が返った場合、この関数はシグナルによって割り込まれており、
59 返り値は \-1 で、
60 .I errno
61
62 .B EINTR
63 に設定される。
64 .SH 履歴
65 この関数の古典的な BSD 版は 4.2BSD で登場した。
66 この関数はプロセスのシグナルマスクを
67 .I sigmask
68 に設定する。
69 シグナルの数が 32 以上に増加したときに、
70 BSD 版は互換性のない Unix95 版に置き換えられた。
71 Unix95 版は、指定されたシグナル
72 .I sig
73 をプロセスのシグナルマスクから削除するだけである。
74 .\" __xpg_sigpause: Unix 95, spec 1170, SVID, SVR4, XPG
75 同じ名前で互換性のない 2 つの関数があるという不幸な事態は、
76 .BR \%sigsuspend (2)
77 関数によって解消された。
78 この関数は (int の代わりに)
79 .B "sigset_t *"
80 引き数をとる。
81 .LP
82 Linux では、このルーチンは Sparc (sparc64) アーキテクチャでのみ
83 システムコールとなっている。
84 libc4 と libc5 には BSD 版しかない。
85 glibc では  _XOPEN_SOURCE が定義されない限り、BSD 版を使う。
86 .\" .SH 注意
87 .\" BSD 版では、
88 .\" .RI 「 sigmask
89 .\" を 0 にして、どのシグナルもブロックされないようにする」
90 .\" というのがよく使われる。
91 .SH 関連項目
92 .BR kill (2),
93 .BR sigaction (2),
94 .BR sigblock (2),
95 .BR sigprocmask (2),
96 .BR sigsuspend (2),
97 .BR sigvec (2)