[master] dfac1eeff Capture all of the child output when it fails to start
Nils Goroll
nils.goroll at uplex.de
Sun Nov 20 19:18:07 UTC 2022
commit dfac1eeff899b2ab0ac63228412b270e319de8a8
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Sun Nov 20 20:15:10 2022 +0100
Capture all of the child output when it fails to start
we only forwarded the result from a single read(), which might have
missed information on the actual error.
diff --git a/bin/varnishd/mgt/mgt_child.c b/bin/varnishd/mgt/mgt_child.c
index da4308c81..2776f9de6 100644
--- a/bin/varnishd/mgt/mgt_child.c
+++ b/bin/varnishd/mgt/mgt_child.c
@@ -426,7 +426,9 @@ mgt_launch_child(struct cli *cli)
assert(u == CLIS_COMMS);
pidr = waitpid(pid, &i, 0);
assert(pidr == pid);
- (void)VLU_Fd(child_std_vlu, child_output);
+ do {
+ i = VLU_Fd(child_std_vlu, child_output);
+ } while (i == 0);
MGT_Complain(C_ERR, "Child failed on launch");
exit(1); // XXX Harsh ?
} else {
More information about the varnish-commit
mailing list