static void _hup_handler(int num)
{
- int a = 0;
+ int a = 0, save_errno = errno;
if (option_verbose > 1)
printf("Received HUP signal -- Reloading configs\n");
if (restartnow)
fprintf(stderr, "hup_handler: write() failed: %s\n", strerror(errno));
}
}
+ errno = save_errno;
}
static struct sigaction hup_handler = {
static void _child_handler(int sig)
{
/* Must not ever ast_log or ast_verbose within signal handler */
- int n, status;
+ int n, status, save_errno = errno;
/*
* Reap all dead children -- not just one
;
if (n == 0 && option_debug)
printf("Huh? Child handler, but nobody there?\n");
+ errno = save_errno;
}
static struct sigaction child_handler = {