.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) .\" .\" %%%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 .\" .\" References consulted: .\" Linux libc source code .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 18:45:17 1993 by Rik Faith (faith@cs.unc.edu) .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka .\" all rights reserved. .\" Translated Fri Dec 26 13:19:15 JST 1997 .\" by HIROFUMI Nishizuka .\" Updated 2013-05-01, Akihiro MOTOKI .\" Updated 2013-05-06, Akihiro MOTOKI .\" .TH PSIGNAL 3 2010\-10\-06 GNU "Linux Programmer's Manual" .SH 名前 psignal, psiginfo \- シグナルメッセージを表示 .SH 書式 .nf \fB#include \fP .sp \fBvoid psignal(int \fP\fIsig\fP\fB, const char *\fP\fIs\fP\fB);\fP \fBvoid psiginfo(const siginfo_t *\fP\fIpinfo\fP\fB, const char *\fP\fIs\fP\fB);\fP .sp \fBextern const char *const \fP\fIsys_siglist\fP\fB[];\fP .fi .sp .in -4n glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): .in .sp \fBpsignal\fP(): _SVID_SOURCE || _BSD_SOURCE .br \fBpsiginfo\fP(): _XOPEN_SOURCE\ >=\ 700 || _POSIX_C_SOURCE\ >=\ 200809L .br \fIsys_siglist\fP: _BSD_SOURCE .SH 説明 \fBpsignal\fP() 関数は、文字列 \fIs\fP、コロン、スペース、シグナル番号 \fIsig\fP を説明する文字列、終端の改行から構成されるメッセージを \fIstderr\fP に表示する。 文字列 \fIs\fP が NULL か空の場合、コロンとスペースは省略される。 \fIsig\fP が不正ならば、表示される メッセージは未知のシグナルを示す。 \fBpsiginfo\fP() 関数は \fBpsignal\fP() と同じだが、 \fIpinfo\fP に書かれたシグナルの情報を表示する点が異なる。 \fIpinfo\fP は有効な \fIsiginfo_t\fP 構造体を指している必要がある。 \fBpsiginfo\fP() は、 シグナルの説明だけでなく、 シグナルの送信元やそのシグナルに関連するその他の情報も表示する (例えば、ハードウェアが発生したシグナルの関連メモリアドレス、 \fBSIGCHLD\fP の子プロセス ID、 \fIkill\fP(2) や \fBsigqueue\fP(3) を使って送信されたシグナルの送信元プロセスのユーザ ID とプロセス ID など)。 配列 \fIsys_siglist\fP はシグナルを説明する文字列を保持しており、 配列へのアクセスにはシグナル番号を添え字として用いる事ができる。 .SH 返り値 関数 \fBpsignal\fP() と \fBpsiginfo\fP() は、値を返さない。 .SH バージョン \fBpsiginfo\fP() 関数は glibc バージョン 2.10 で追加された。 .SH 準拠 POSIX.1\-2008, 4.3BSD. .SH バグ バージョン 2.12 までの glibc では \fBpsiginfo\fP() には以下のバグがあった。 .IP * 3 .\" FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12107 .\" Reportedly now fixed; check glibc 2.13 特定の状況で、末尾の改行が出力されない。 .IP * .\" FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12108 .\" Reportedly now fixed; check glibc 2.13 リアルタイムシグナルの場合に、追加の詳細情報が表示されない。 .SH 関連項目 \fBsigaction\fP(2), \fBperror\fP(3), \fBstrsignal\fP(3), \fBsignal\fP(7) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.65 の一部である。 プロジェクトの説明とバグ報告に関する情報は \%http://www.kernel.org/doc/man\-pages/ に書かれている。