626 |
{ |
{ |
627 |
pid_t pid; |
pid_t pid; |
628 |
int status; |
int status; |
629 |
|
char buffer[128]; |
630 |
|
|
631 |
for (;;) { |
for (;;) { |
632 |
|
|
633 |
pid = waitpid((pid_t)-1, &status, WNOHANG); |
pid = waitpid((pid_t)-1, &status, WNOHANG); |
634 |
if (pid <= 0) |
if (pid <= 0) |
635 |
break; |
break; |
636 |
|
|
637 |
debug(2, ("child %d exited: %d", pid, WEXITSTATUS(status))); |
format_exit_status(buffer, sizeof buffer, status); |
638 |
|
radlog(L_NOTICE, "child %d %s", pid, buffer); |
639 |
|
|
640 |
rpp_remove(pid); |
rpp_remove(pid); |
641 |
} |
} |
861 |
{ |
{ |
862 |
static int signum[] = { |
static int signum[] = { |
863 |
SIGHUP, SIGUSR1, SIGUSR2, SIGQUIT, |
SIGHUP, SIGUSR1, SIGUSR2, SIGQUIT, |
864 |
SIGTERM, SIGCHLD, SIGBUS, SIGTRAP, |
SIGTERM, SIGCHLD, SIGBUS, |
865 |
SIGFPE, SIGSEGV, SIGILL, SIGPIPE |
SIGFPE, SIGSEGV, SIGILL, SIGPIPE |
866 |
}; |
}; |
867 |
int i; |
int i; |