daemon: only wait for immediate child YAZ-704
authorAdam Dickmeiss <adam@indexdata.dk>
Fri, 1 Nov 2013 13:49:55 +0000 (13:49 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Fri, 1 Nov 2013 14:31:34 +0000 (14:31 +0000)
rather than all children.

src/daemon.c

index 3b757e1..87db405 100644 (file)
@@ -127,7 +127,7 @@ static void keepalive(void (*work)(void *data), void *data)
         /* enable signalling in kill_child_handler */
         child_pid = p;
 
-        p1 = wait(&status);
+        p1 = waitpid(p, &status, 0);
 
         /* disable signalling in kill_child_handler */
         child_pid = 0;