static bool signals_initialized = FALSE;
static struct io *io_sig = NULL;
-const char *lib_signal_code_to_str(int signo, int si_code)
+const char *lib_signal_code_to_str(int signo, int sicode)
{
/* common */
- switch (si_code) {
+ switch (sicode) {
case SI_USER:
return "kill";
#ifdef SI_KERNEL
switch (signo) {
case SIGSEGV:
- switch (si_code) {
+ switch (sicode) {
case SEGV_MAPERR:
return "address not mapped";
case SEGV_ACCERR:
}
break;
case SIGBUS:
- switch (si_code) {
+ switch (sicode) {
case BUS_ADRALN:
return "invalid address alignment";
case BUS_ADRERR:
return "object-specific hardware error";
}
}
- return t_strdup_printf("unknown %d", si_code);
+ return t_strdup_printf("unknown %d", sicode);
}
static void sig_handler(int signo, siginfo_t *si, void *context ATTR_UNUSED)
typedef void signal_handler_t(const siginfo_t *si, void *context);
/* Convert si_code to string */
-const char *lib_signal_code_to_str(int signo, int si_code);
+const char *lib_signal_code_to_str(int signo, int sicode);
/* Set signal handler for specific signal. If delayed is TRUE, the handler
will be called later, ie. not as a real signal handler. */