[3.0] 784396f Don't leave pid file in weird error case.

Tollef Fog Heen tfheen at varnish-cache.org
Thu Sep 22 14:02:32 CEST 2011


commit 784396fd1b3c2481ed0d99c294afb3102f64747d
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Sep 7 20:16:30 2011 +0000

    Don't leave pid file in weird error case.

diff --git a/bin/varnishd/mgt_child.c b/bin/varnishd/mgt_child.c
index ebdf57b..9d6966a 100644
--- a/bin/varnishd/mgt_child.c
+++ b/bin/varnishd/mgt_child.c
@@ -595,8 +595,10 @@ MGT_Run(void)
 		REPORT0(LOG_ERR, "No VCL loaded yet");
 	else if (!d_flag) {
 		start_child(NULL);
-		if (child_state == CH_STOPPED)
-			exit(2);
+		if (child_state == CH_STOPPED) {
+			exit_status = 2;
+			return;
+		}
 	}
 
 	i = vev_schedule(mgt_evb);



More information about the varnish-commit mailing list