#5 Fix waiting for processes

closed
nobody
None
5
2013-01-18
2012-12-28
Martin Koegler
No

watchdog needs to request exit status for any child, as otherwise processes queued in process_head will always time out.

--- src/test_binary.c.orig 2012-12-27 11:32:07.622465713 +0100
+++ src/test_binary.c 2012-12-27 11:32:58.242518035 +0100
@@ -142,7 +142,7 @@
usleep(tint * 500000);

do {
- ret = waitpid(child_pid, &result, WNOHANG);
+ ret = waitpid(-1, &result, WNOHANG);
err = errno;
if (ret > 0)
remove_process(ret);

Discussion

  • Michael Meskes
    Michael Meskes
    2013-01-18

    Applied, thanks for the patch.

     
  • Michael Meskes
    Michael Meskes
    2013-01-18

    • status: open --> closed