Commit fe51ed40 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Just return if there is nothing to wait for. We get SIGCHLD'ed on

the popen child process.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@80 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 34b5adca
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment