|
The str2sig() function translates the signal name str to a signal number, and stores that result in the location referenced by signum. The name in str can be either the symbol for that signal, without the "SIG"
prefix, or a decimal number. All the signal symbols defined in <sys/signal.h> are recognized. This means that both "CLD" and "CHLD" are recognized and return the same signal number, as do both "POLL" and "IO". For access to the signals in the range SIGRTMIN to SIGRTMAX, the first four signals match the strings "RTMIN", "RTMIN+1", "RTMIN+2", and "RTMIN+3" and the last four match the strings "RTMAX-3", "RTMAX-2", "RTMAX-1", and "RTMAX".
The sig2str() function translates the signal number signum to the symbol for that signal, without the "SIG" prefix, and stores that symbol at the location specified by str. The storage referenced by str should
be large enough to hold the symbol and a terminating null byte. The symbol SIG2STR_MAX defined by <signal.h> gives the maximum size in bytes required.
|