mirror of
https://sourceware.org/git/glibc.git
synced 2025-12-24 17:51:17 +03:00
string: Add sigabbrev_np and sigdescr_np
The sigabbrev_np returns the abbreviated signal name (e.g. "HUP" for SIGHUP) while sigdescr_np returns the string describing the error number (e.g "Hangup" for SIGHUP). Different than strsignal, sigdescr_np does not attempt to translate the return description and both functions return NULL for an invalid signal number. They should be used instead of sys_siglist or sys_sigabbrev and they are both thread and async-signal safe. They are added as GNU extensions on string.h header (same as strsignal). Checked on x86-64-linux-gnu, i686-linux-gnu, powerpc64le-linux-gnu, and s390x-linux-gnu. Tested-by: Carlos O'Donell <carlos@redhat.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
@@ -2188,6 +2188,8 @@ GLIBC_2.32 pthread_attr_setsigmask_np F
|
||||
GLIBC_2.32 pthread_getaffinity_np F
|
||||
GLIBC_2.32 pthread_getattr_np F
|
||||
GLIBC_2.32 pthread_sigmask F
|
||||
GLIBC_2.32 sigabbrev_np F
|
||||
GLIBC_2.32 sigdescr_np F
|
||||
GLIBC_2.4 _IO_fprintf F
|
||||
GLIBC_2.4 _IO_printf F
|
||||
GLIBC_2.4 _IO_sprintf F
|
||||
|
||||
@@ -2115,6 +2115,8 @@ GLIBC_2.32 pthread_attr_setsigmask_np F
|
||||
GLIBC_2.32 pthread_getaffinity_np F
|
||||
GLIBC_2.32 pthread_getattr_np F
|
||||
GLIBC_2.32 pthread_sigmask F
|
||||
GLIBC_2.32 sigabbrev_np F
|
||||
GLIBC_2.32 sigdescr_np F
|
||||
GLIBC_2.4 __confstr_chk F
|
||||
GLIBC_2.4 __fgets_chk F
|
||||
GLIBC_2.4 __fgets_unlocked_chk F
|
||||
|
||||
Reference in New Issue
Block a user