device matching against UUIDs: do not try floppies
[oweals/busybox.git] / runit / svlogd.c
index 960879513e2373be183ed1b2844aa1d16b976b55..25799f6be556a3208135a448df9b67f3c9f4ae8b 100644 (file)
@@ -227,11 +227,12 @@ static void processorstart(struct logdir *ld)
                int fd;
 
                /* child */
-               bb_signals(0
+               /* Non-ignored signals revert to SIG_DFL on exec anyway */
+               /*bb_signals(0
                        + (1 << SIGTERM)
                        + (1 << SIGALRM)
                        + (1 << SIGHUP)
-                       , SIG_DFL);
+                       , SIG_DFL);*/
                sig_unblock(SIGTERM);
                sig_unblock(SIGALRM);
                sig_unblock(SIGHUP);
@@ -280,7 +281,7 @@ static unsigned processorstop(struct logdir *ld)
        if (ld->fddir == -1) return 1;
        while (fchdir(ld->fddir) == -1)
                pause2cannot("change directory, want processor", ld->name);
-       if (wait_exitcode(wstat) != 0) {
+       if (WEXITSTATUS(wstat) != 0) {
                warnx("processor failed, restart", ld->name);
                ld->fnsave[26] = 't';
                unlink(ld->fnsave);
@@ -797,7 +798,8 @@ static void sig_term_handler(int sig_no UNUSED_PARAM)
 
 static void sig_child_handler(int sig_no UNUSED_PARAM)
 {
-       int pid, l;
+       pid_t pid;
+       int l;
 
        if (verbose)
                bb_error_msg(INFO"sig%s received", "child");
@@ -910,10 +912,10 @@ int svlogd_main(int argc, char **argv)
        sigaddset(&blocked_sigset, SIGALRM);
        sigaddset(&blocked_sigset, SIGHUP);
        sigprocmask(SIG_BLOCK, &blocked_sigset, NULL);
-       bb_signals_recursive(1 << SIGTERM, sig_term_handler);
-       bb_signals_recursive(1 << SIGCHLD, sig_child_handler);
-       bb_signals_recursive(1 << SIGALRM, sig_alarm_handler);
-       bb_signals_recursive(1 << SIGHUP, sig_hangup_handler);
+       bb_signals_recursive_norestart(1 << SIGTERM, sig_term_handler);
+       bb_signals_recursive_norestart(1 << SIGCHLD, sig_child_handler);
+       bb_signals_recursive_norestart(1 << SIGALRM, sig_alarm_handler);
+       bb_signals_recursive_norestart(1 << SIGHUP, sig_hangup_handler);
 
        logdirs_reopen();