.\" Copyright (c) 2005 Michael Kerrisk .\" based on earlier work by faith@cs.unc.edu and .\" Mike Battersby .\" .\" %%%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 .\" .\" 2005-09-15, mtk, Created new page by splitting off from sigaction.2 .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 2005 Akihiro MOTOKI all rights reserved. .\" Translated 2005-10-03, Akihiro MOTOKI .\" Updated 2005-12-05, Akihiro MOTOKI, Catch up to LDP man-pages 2.16 .\" .TH SIGPENDING 2 2017\-09\-15 Linux "Linux Programmer's Manual" .SH 名前 sigpending, rt_sigpending \- 処理待ちのシグナルの検査 .SH 書式 \fB#include \fP .PP \fBint sigpending(sigset_t *\fP\fIset\fP\fB);\fP .PP .RS -4 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): .RE .PP .ad l \fBsigpending\fP(): _POSIX_C_SOURCE .ad b .SH 説明 \fBsigpending\fP() は、呼び出し元のスレッドへの配送を待っている (pending) シグナル集合 (すなわち、禁止中に発生したシグナル) を返す。 処理待ちのシグナルのマスクが \fIset\fP に格納される。 .SH 返り値 \fBsigpending\fP() は成功した場合 0 を返す。 エラーの場合、 \-1 を返し、\fIerrno\fP にエラーの原因を示す値を設定する。 .SH エラー .TP \fBEFAULT\fP \fIset\fP が指しているメモリーが、プロセスのアドレス空間の有効な部分ではない。 .SH 準拠 POSIX.1\-2001, POSIX.1\-2008. .SH 注意 シグナル集合の操作に関する詳細は \fBsigsetops\fP(3) を参照のこと。 .PP シグナルが禁止 (ブロック) されており、かつ配送方法が "ignored" (無視) になっている場合、そのシグナルが発生した場合に処理待ちシグナルのマスクにそのシグナルは追加\fIされない\fP。 .PP あるスレッドに対する処理待ちのシグナルの集合は、 そのスレッド自体への処理待ちのシグナル集合と、プロセス全体への処理待ちの シグナル集合をあわせたものである。 \fBsignal\fP(7) 参照。 .PP .\" \fBfork\fP(2) 経由で作成された子プロセスでは、処理待ちのシグナル集合は空の集合で初期化される。 \fBexecve\fP(2) の前後で、処理待ちのシグナル集合は保持される。 .SS "C ライブラリとカーネルの違い" .\" This argument is currently required to be less than or equal to .\" .IR sizeof(sigset_t) .\" (or the error .\" .B EINVAL .\" results). .\" The original Linux system call was named \fBsigpending\fP(). However, with the addition of real\-time signals in Linux 2.2, the fixed\-size, 32\-bit \fIsigset_t\fP argument supported by that system call was no longer fit for purpose. Consequently, a new system call, \fBrt_sigpending\fP(), was added to support an enlarged \fIsigset_t\fP type. The new system call takes a second argument, \fIsize_t sigsetsize\fP, which specifies the size in bytes of the signal set in \fIset\fP. The glibc \fBsigpending\fP() wrapper function hides these details from us, transparently calling \fBrt_sigpending\fP() when the kernel provides it. .SH バグ バージョン 2.2.1 以前の glibc では、 \fBsigpending\fP() のラッパー関数に、処理待ちのリアルタイムシグナルに関する情報が 正しく返されないというバグがある。 .SH 関連項目 \fBkill\fP(2), \fBsigaction\fP(2), \fBsignal\fP(2), \fBsigprocmask\fP(2), \fBsigsuspend\fP(2), \fBsigsetops\fP(3), \fBsignal\fP(7) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は \%https://www.kernel.org/doc/man\-pages/ に書かれている。