Man page - strsignal(3)

Packages contains this manual

Available languages:

en fr pl ja ro

Manual

STRSIGNAL

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

名 前

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) を 参 照 。

Image grohtml-36984-1.png

準 拠

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/ に 書 か れ て い る 。