STRSIGNAL

Section: Linux Programmer's Manual (3)
Updated: 2020-11-01
Index JM Home Page
 

名前

strsignal, sigdescr_np, sigdescr_np, sys_siglist - シグナルを説明する文字列を返す  

書式

#include <string.h>

char *strsignal(int sig);
char *sigdescr_np(int sig);
char *sigabbrev_np(int sig);

extern const char * const sys_siglist[];

glibc 向けの機能検査マクロの要件 (feature_test_macros(7) 参照):

sigabbrev_np(), sigdescr_np():

_GNU_SOURCE
strsignal():
From glibc 2.10 to 2.31:
_POSIX_C_SOURCE >= 200809L
glibc 2.10 より前:
_GNU_SOURCE

sys_siglist:
    glibc 2.19 以降:
        _DEFAULT_SOURCE
    glibc 2.19 以前:
        _BSD_SOURCE  

説明

The strsignal() function returns a string describing the signal number passed in the argument sig. The string can be used only until the next call to strsignal(). The string returned by strsignal() is localized according to the LC_MESSAGES category in the current locale.

The sigdescr_np() function returns a string describing the signal number passed in the argument sig. Unlike strsignal() this string is not influenced by the current locale.

The sigabbrev_np() function returns the abbreviated name of the signal, sig. For example, given the value SIGINT, it returns the string "INT".

The (deprecated) array sys_siglist holds the signal description strings indexed by signal number. The strsignal() or the sigdescr_np() function should be used instead of this array; see also VERSIONS.  

返り値

strsignal() 関数は、シグナルの適切な説明を返す。 もしシグナル番号が不正な場合は、未知のシグナル (unknown signal) を示す メッセージを返す。 (Linux はそうではないが)不正なシグナル番号に対して、 NULL を返すシステムもある。

The sigdescr_np() and sigdabbrev_np() 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.  

バージョン

sigdescr_np() と sigdabbrev_np() は glibc 2.32 で初めて登場した。

Starting with version 2.32, the sys_siglist symbol is no longer exported by glibc.  

属性

この節で使用されている用語の説明については、 attributes(7) を参照。
インターフェース 属性
strsignal() Thread safety MT-Unsafe race:strsignal locale
sigdescr_np(), sigabbrev_np() Thread safety MT-Safe

 

準拠

strsignal(): POSIX.1-2008. Solaris と BSD 系にも存在する。

sigdescr_np() と sigdabbrev_np() は GNU による拡張である。

sys_siglist is nonstandard, but present on many other systems.  

注意

sigdescr_np() and sigdabbrev_np() are thread-safe and async-signal-safe.  

関連項目

psignal(3), strerror(3)  

この文書について

この man ページは Linux man-pages プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は https://www.kernel.org/doc/man-pages/ に書かれている。

関連キーワード

strsignal, sigdescr, string, STRSIGNAL, siglist, sys, sig, SOURCE, シグナル, returns

Linux マニュアル 一覧

[man1] [man2] [man3] [man4] [man5] [man6] [man7] [man8]
[a] [b] [c] [d] [e] [f] [g] [h] [i] [j] [k] [l] [m] [n] [o] [p] [q] [r] [s] [t] [u] [v] [w] [x] [y] [z]

 

Index

名前
書式
説明
返り値
バージョン
属性
準拠
注意
関連項目
この文書について

This document was created by man2html, using the manual pages.
Time: 12:08:37 GMT, June 11, 2022