OSDN Git Service

d52affc214088792829492a7c7262f1dd2b01a9e
[linuxjm/LDP_man-pages.git] / release / man3 / psignal.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\"
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" %%%LICENSE_END
24 .\"
25 .\" References consulted:
26 .\"     Linux libc source code
27 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
28 .\"     386BSD man pages
29 .\" Modified Sat Jul 24 18:45:17 1993 by Rik Faith (faith@cs.unc.edu)
30 .\"*******************************************************************
31 .\"
32 .\" This file was generated with po4a. Translate the source file.
33 .\"
34 .\"*******************************************************************
35 .TH PSIGNAL 3 2010\-10\-06 GNU "Linux Programmer's Manual"
36 .SH 名前
37 psignal, psiginfo \- シグナルメッセージを表示
38 .SH 書式
39 .nf
40 \fB#include <signal.h>\fP
41 .sp
42 \fBvoid psignal(int \fP\fIsig\fP\fB, const char *\fP\fIs\fP\fB);\fP
43 \fBvoid psiginfo(const siginfo_t *\fP\fIpinfo\fP\fB, const char *\fP\fIs\fP\fB);\fP
44 .sp
45 \fBextern const char *const \fP\fIsys_siglist\fP\fB[];\fP
46 .fi
47 .sp
48 .in -4n
49 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
50 .in
51 .sp
52 \fBpsignal\fP(): _SVID_SOURCE || _BSD_SOURCE
53 .br
54 \fBpsiginfo\fP(): _XOPEN_SOURCE\ >=\ 700 || _POSIX_C_SOURCE\ >=\ 200809L
55 .br
56 \fIsys_siglist\fP: _BSD_SOURCE
57 .SH 説明
58 \fBpsignal\fP() 関数は、文字列 \fIs\fP、コロン、スペース、
59 シグナル番号 \fIsig\fP を説明する文字列、終端の改行から
60 構成されるメッセージを \fIstderr\fP に表示する。
61 文字列 \fIs\fP が NULL か空の場合、コロンとスペースは省略される。
62 \fIsig\fP が不正ならば、表示される メッセージは未知のシグナルを示す。
63
64 \fBpsiginfo\fP() 関数は \fBpsignal\fP() と同じだが、 \fIpinfo\fP に書かれたシグナルの情報を表示する点が異なる。
65 \fIpinfo\fP は有効な \fIsiginfo_t\fP 構造体を指している必要がある。 \fBpsiginfo\fP() は、 シグナルの説明だけでなく、
66 シグナルの送信元やそのシグナルに関連するその他の情報も表示する (例えば、ハードウェアが発生したシグナルの関連メモリアドレス、 \fBSIGCHLD\fP
67 の子プロセス ID、 \fIkill\fP(2) や \fBsigqueue\fP(3) を使って送信されたシグナルの送信元プロセスのユーザ ID とプロセス ID
68 など)。
69
70 配列 \fIsys_siglist\fP はシグナルを説明する文字列を保持しており、 配列へのアクセスにはシグナル番号を添え字として用いる事ができる。
71 .SH 返り値
72 関数 \fBpsignal\fP() と \fBpsiginfo\fP() は、値を返さない。
73 .SH バージョン
74 \fBpsiginfo\fP() 関数は glibc バージョン 2.10 で追加された。
75 .SH 準拠
76 POSIX.1\-2008, 4.3BSD.
77 .SH バグ
78 バージョン 2.12 までの glibc では \fBpsiginfo\fP() には以下のバグがあった。
79 .IP * 3
80 .\" FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12107
81 .\" Reportedly now fixed; check glibc 2.13
82 特定の状況で、末尾の改行が出力されない。
83 .IP *
84 .\" FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12108
85 .\" Reportedly now fixed; check glibc 2.13
86 リアルタイムシグナルの場合に、追加の詳細情報が表示されない。
87 .SH 関連項目
88 \fBsigaction\fP(2), \fBperror\fP(3), \fBstrsignal\fP(3), \fBsignal\fP(7)
89 .SH この文書について
90 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部
91 である。プロジェクトの説明とバグ報告に関する情報は
92 http://www.kernel.org/doc/man\-pages/ に書かれている。