chiark / gitweb /
polypath: Reorganise to break up ifaddr handling
[secnet.git] / process.c
index 12e2caac5fc6d7d2749422434af2cda54245d056..77fe38e3127134077d8cbdbc3e6e460bcefaf942 100644 (file)
--- a/process.c
+++ b/process.c
@@ -218,6 +218,10 @@ void afterfork(void)
     sigset_t done;
     struct sigaction sa;
 
+    clear_phase_hooks(PHASE_SHUTDOWN);
+    /* Prevents calls to fatal() etc. in the child from running off
+       and doing a lot of unhelpful things */
+
     sigemptyset(&done);
     for (n=sigs; n; n=n->next)
        if (!sigismember(&done,n->signum)) {
@@ -302,6 +306,7 @@ void start_signal_handling(void)
     spw=p[1];
     spr=p[0];
     setnonblock(spw);
+    setnonblock(spr);
 
     register_for_poll(NULL,signal_beforepoll,signal_afterpoll,"signal");
     signal_handling=True;