]> err.no Git - varnish/commitdiff
Just return if there is nothing to wait for. We get SIGCHLD'ed on
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 27 Mar 2006 13:59:09 +0000 (13:59 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 27 Mar 2006 13:59:09 +0000 (13:59 +0000)
the popen child process.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@80 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/mgt_child.c

index af4d226f47cdc490a8f57da982eabc78c6013a30..a581fc785594a96aec2e79395aeff2b44dd07a96 100644 (file)
@@ -188,7 +188,7 @@ child_pingpong(int a, short b, void *c)
        time(&t);
        mgt_child_request(child_pingpong_ccb, NULL, NULL, "ping %ld", t);
        if (1) {
-               tv.tv_sec = 3;
+               tv.tv_sec = 30;
                tv.tv_usec = 0;
                evtimer_del(&ev_child_pingpong);
                evtimer_add(&ev_child_pingpong, &tv);
@@ -284,6 +284,8 @@ mgt_sigchld(int a, short b, void *c)
        printf("sig_chld(%d, %d, %p)\n", a, b, c);
 
        p = wait4(-1, &status, WNOHANG, NULL);
+       if (p == 0)
+               return;
        printf("pid = %d status = 0x%x\n", p, status);
        assert(p == child_pid);