.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) .\" and Copyright (C) 2020 Michael Kerrisk .\" .\" %%%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 17:59:03 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:13:20 JST 1997 .\" by HIROFUMI Nishizuka .\" Modified Thu Dec 8 05:09:52 JST 1999 .\" by Kentaro Shirakata .\" .TH STRSIGNAL 3 2020\-11\-01 GNU "Linux Programmer's Manual" .SH 名前 strsignal, sigdescr_np, sigdescr_np, sys_siglist \- シグナルを説明する文字列を返す .SH 書式 .nf \fB#include \fP .PP \fBchar *strsignal(int \fP\fIsig\fP\fB);\fP \fBchar *sigdescr_np(int \fP\fIsig\fP\fB);\fP \fBchar *sigabbrev_np(int \fP\fIsig\fP\fB);\fP .PP \fBextern const char * const \fP\fIsys_siglist\fP\fB[];\fP .fi .PP .RS -4 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): .RE .PP \fBsigabbrev_np\fP(), \fBsigdescr_np\fP(): .PD 0 .ad l .RS 4 .TP 4 _GNU_SOURCE .RE \fBstrsignal\fP(): .ad l .RS 4 .TP 4 From glibc 2.10 to 2.31: _POSIX_C_SOURCE\ >=\ 200809L .TP glibc 2.10 より前: _GNU_SOURCE .RE .br \fIsys_siglist\fP: glibc 2.19 以降: _DEFAULT_SOURCE glibc 2.19 以前: _BSD_SOURCE .ad .PD .SH 説明 The \fBstrsignal\fP() function returns a string describing the signal number passed in the argument \fIsig\fP. The string can be used only until the next call to \fBstrsignal\fP(). The string returned by \fBstrsignal\fP() is localized according to the \fBLC_MESSAGES\fP category in the current locale. .PP The \fBsigdescr_np\fP() function returns a string describing the signal number passed in the argument \fIsig\fP. Unlike \fBstrsignal\fP() this string is not influenced by the current locale. .PP The \fBsigabbrev_np\fP() function returns the abbreviated name of the signal, \fIsig\fP. For example, given the value \fBSIGINT\fP, it returns the string "INT". .PP The (deprecated) array \fIsys_siglist\fP holds the signal description strings indexed by signal number. The \fBstrsignal\fP() or the \fBsigdescr_np\fP() function should be used instead of this array; see also VERSIONS. .SH 返り値 \fBstrsignal\fP() 関数は、シグナルの適切な説明を返す。 もしシグナル番号が不正な場合は、未知のシグナル (unknown signal) を示す メッセージを返す。 (Linux はそうではないが)不正なシグナル番号に対して、 NULL を返すシステムもある。 .PP The \fBsigdescr_np\fP() and \fBsigdabbrev_np\fP() functions return the appropriate description string. The returned string is statically allocated and valid for the lifetime of the program. These functions return NULL for an invalid signal number. .SH バージョン \fBsigdescr_np\fP() と \fBsigdabbrev_np\fP() は glibc 2.32 で初めて登場した。 .PP .\" glibc commit b1ccfc061feee9ce616444ded8e1cd5acf9fa97f Starting with version 2.32, the \fIsys_siglist\fP symbol is no longer exported by glibc. .SH 属性 この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。 .TS allbox; lb lb lbw31 l l l. インターフェース 属性 値 T{ \fBstrsignal\fP() T} Thread safety MT\-Unsafe race:strsignal locale T{ \fBsigdescr_np\fP(), \fBsigabbrev_np\fP() T} Thread safety MT\-Safe .TE .sp 1 .SH 準拠 \fBstrsignal\fP(): POSIX.1\-2008. Solaris と BSD 系にも存在する。 .PP \fBsigdescr_np\fP() と \fBsigdabbrev_np\fP() は GNU による拡張である。 .PP \fIsys_siglist\fP is nonstandard, but present on many other systems. .SH 注意 \fBsigdescr_np\fP() and \fBsigdabbrev_np\fP() are thread\-safe and async\-signal\-safe. .SH 関連項目 \fBpsignal\fP(3), \fBstrerror\fP(3) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は \%https://www.kernel.org/doc/man\-pages/ に書かれている。