[master] 7c145b2 Don't attempt to reopen sockets until child has died.

Poul-Henning Kamp phk at FreeBSD.org
Wed Mar 18 15:06:04 CET 2015


commit 7c145b2004c496a32d0eb644b65cc4677b545e9f
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Mar 18 13:54:49 2015 +0000

    Don't attempt to reopen sockets until child has died.

diff --git a/bin/varnishd/mgt/mgt_child.c b/bin/varnishd/mgt/mgt_child.c
index a7daa8d..2dfacf4 100644
--- a/bin/varnishd/mgt/mgt_child.c
+++ b/bin/varnishd/mgt/mgt_child.c
@@ -393,8 +393,6 @@ mgt_launch_child(struct cli *cli)
 	mgt_child_inherit(heritage.cli_out, NULL);
 	closex(&heritage.cli_out);
 
-	MAC_reopen_sockets(cli);
-
 	child_std_vlu = VLU_New(NULL, child_line, 0);
 	AN(child_std_vlu);
 
@@ -486,6 +484,8 @@ mgt_reap_child(void)
 		fprintf(stderr, "WAIT 0x%jx\n", (uintmax_t)r);
 	assert(r == child_pid);
 
+	MAC_reopen_sockets(NULL);
+
 	/* Compose obituary */
 	vsb = VSB_new_auto();
 	XXXAN(vsb);



More information about the varnish-commit mailing list