Commit 1b43b16c authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Make sure we get the error messages from a dying child.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1046 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 4e540dde
......@@ -173,7 +173,9 @@ start_child(void)
if (mgt_push_vcls_and_start(&i, &p)) {
fprintf(stderr, "Pushing vcls failed:\n%s\n", p);
free(p);
exit (2);
/* Pick up any stuff lingering on stdout/stderr */
child_listener(NULL, EV_RD);
exit(2);
}
child_state = CH_RUNNING;
}
......@@ -235,6 +237,9 @@ mgt_sigchld(struct ev *e, int what)
fprintf(stderr, "Cache child died pid=%d status=0x%x\n", r, status);
child_pid = -1;
/* Pick up any stuff lingering on stdout/stderr */
child_listener(NULL, EV_RD);
if (child_state == CH_RUNNING) {
child_state = CH_DIED;
fprintf(stderr, "Clean child\n");
......
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