Fix daemon: parent process stops before child YAZ-806
[yaz-moved-to-github.git] / src / daemon.c
index 3a8bb42..3ece89c 100644 (file)
@@ -69,13 +69,13 @@ static void normal_stop_handler(int num)
     if (child_pid)
     {
         /* relay signal to child */
-        child_got_signal_from_us = 1;
         kill(child_pid, num);
     }
 }
 
 static void sigusr2_handler(int num)
 {
+    child_got_signal_from_us = 1;
 }
 
 static pid_t keepalive_pid = 0;