Fix daemon: parent process stops before child YAZ-806
authorAdam Dickmeiss <adam@indexdata.dk>
Wed, 10 Dec 2014 14:54:35 +0000 (14:54 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Wed, 10 Dec 2014 14:54:35 +0000 (14:54 +0000)
Try to fix the situation where parent process stops before
child has acknowledged it .. SIGUSR2 back!

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;