.\" Copyright (C) 2004 Andries Brouwer (aeb@cwi.nl) .\" .\" %%%LICENSE_START(VERBATIM) .\" 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. .\" %%%LICENSE_END .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya .\" all rights reserved. .\" Translated 1997-03-03, HANATAKA Shinya .\" Updated 2005-12-05, Akihiro MOTOKI .\" Catch up to LDP man-pages 2.16 .\" Rename sigpause.2 to sigpause.3, and modified a little. .\" .TH SIGPAUSE 3 2014\-01\-07 Linux "Linux Programmer's Manual" .SH 名前 sigpause \- ブロックされたシグナルをアトミックに解放して割り込みを待つ .SH 書式 .nf \fB#include \fP .sp \fBint sigpause(int \fP\fIsigmask\fP\fB); /* BSD (ただし「備考」を参照) */\fP .sp \fBint sigpause(int \fP\fIsig\fP\fB); /* System V / UNIX 95 */\fP .fi .SH 説明 この関数を使わないこと。 代わりに \fBsigsuspend\fP(2) を使うこと。 .LP 関数 \fBsigpause\fP() はシグナルを待つように設計されている。 この関数はプロセスのシグナルマスク (ブロックされたシグナルのセット) を変更し、 シグナルが到着するのを待つ。 シグナルが到着すると、シグナルマスクは元に戻される。 .SH 返り値 \fBsigpause\fP() が返った場合、この関数はシグナルによって割り込まれている。 返り値は \-1 で、 \fIerrno\fP は \fBEINTR\fP に設定される。 .SH 属性 .SS "マルチスレッディング (pthreads(7) 参照)" \fBsigpause\fP() 関数はスレッドセーフである。 .SH 準拠 System V 版の \fBsigpause\fP() は POSIX.1\-2001 で標準化されている。 .SH 注意 .SS 歴史 .\" __xpg_sigpause: UNIX 95, spec 1170, SVID, SVr4, XPG この関数の古典的な BSD 版は 4.2BSD で登場した。 この関数はプロセスのシグナルマスクを \fIsigmask\fP に設定する。 UNIX 95 では BSD 版と互換性のない System V 版のこの関数が標準化された。 UNIX 95 版は、指定されたシグナル \fIsig\fP をプロセスのシグナルマスクから削除するだけである。 同じ名前で互換性のない 2 つの関数があるという不幸な事態は、 \fB\%sigsuspend\fP(2) 関数によって解消された。 この関数は (\fIint\fP の代わりに) \fBsigset_t\ *\fP 引き数をとる。 .SS "Linux での注意" Linux では、このルーチンは Sparc (sparc64) アーキテクチャでのみ システムコールとなっている。 libc4 と libc5 には BSD 版しかない。 .\" .\" For the BSD version, one usually uses a zero .\" .I sigmask .\" to indicate that no signals are to be blocked. 機能検査マクロ \fB_BSD_SOURCE\fP が定義され、 \fB_POSIX_SOURCE\fP, \fB_POSIX_C_SOURCE\fP, \fB_XOPEN_SOURCE\fP, \fB_GNU_SOURCE\fP, \fB_SVID_SOURCE\fP のいずれも定義されていない場合、 glibc は BSD 版を使う。 それ以外の場合には、System V 版を使用する (宣言を得るためには \fB_XOPEN_SOURCE\fP が定義されていなければならない)。 glibc 2.19 以降では、 \fI\fP では System V 版だけが公開される。 BSD 版の \fBsigpause\fP() を使用していたアプリケーションは \fBsigsuspend\fP(2) を使用するように修正すべきである。 .SH 関連項目 \fBkill\fP(2), \fBsigaction\fP(2), \fBsigprocmask\fP(2), \fBsigsuspend\fP(2), \fBsigblock\fP(3), \fBsigvec\fP(3), \fBfeature_test_macros\fP(7) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.65 の一部である。 プロジェクトの説明とバグ報告に関する情報は \%http://www.kernel.org/doc/man\-pages/ に書かれている。