.\" Copyright (C) 2004 Andries Brouwer (aeb@cwi.nl) .\" .\" 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. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" 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) 1997 HANATAKA Shinya .\" all rights reserved. .\" Translated Mon Mar 3 23:33:12 JST 1997 .\" by HANATAKA Shinya .\" .\"WORD: signal シグナル .\"WORD: interrupt 割り込み .\"WORD: mask マスク .\"WORD: block ブロックする .\" .TH SIGPAUSE 2 2004-05-10 "Linux 2.6" "Linux Programmer's Manual" .SH 名前 sigpause \- ブロックされたシグナルをアトミックに解放 (release) して割り込み (interrupt) を待つ .SH 書式 .nf .B #include .sp .BI "int sigpause(int " sigmask "); /* BSD */" .sp .BI "int sigpause(int " sig "); /* Unix95 */" .fi .SH 説明 この関数を使わないこと。 代わりに .BR sigsuspend (2) を使うこと。 .LP 関数 .BR sigpause () はシグナルを待つように設計されている。 この関数はプロセスのシグナルマスク (ブロックされたシグナルのセット) を変更し、 シグナルが到着するのを待つ。 シグナルが到着すると、シグナルマスクは元に戻される。 .SH 返り値 .BR sigpause () が返った場合、この関数はシグナルによって割り込まれており、 返り値は \-1 で、 .I errno は .B EINTR に設定される。 .SH 履歴 この関数の古典的な BSD 版は 4.2BSD で登場した。 この関数はプロセスのシグナルマスクを .I sigmask に設定する。 シグナルの数が 32 以上に増加したときに、 BSD 版は互換性のない Unix95 版に置き換えられた。 Unix95 版は、指定されたシグナル .I sig をプロセスのシグナルマスクから削除するだけである。 .\" __xpg_sigpause: Unix 95, spec 1170, SVID, SVR4, XPG 同じ名前で互換性のない 2 つの関数があるという不幸な事態は、 .BR \%sigsuspend (2) 関数によって解消された。 この関数は (int の代わりに) .B "sigset_t *" 引き数をとる。 .LP Linux では、このルーチンは Sparc (sparc64) アーキテクチャでのみ システムコールとなっている。 libc4 と libc5 には BSD 版しかない。 glibc では _XOPEN_SOURCE が定義されない限り、BSD 版を使う。 .\" .SH 注意 .\" BSD 版では、 .\" .RI 「 sigmask .\" を 0 にして、どのシグナルもブロックされないようにする」 .\" というのがよく使われる。 .SH 関連項目 .BR kill (2), .BR sigaction (2), .BR sigblock (2), .BR sigprocmask (2), .BR sigsuspend (2), .BR sigvec (2)