[4.0] 1c4e35f Add an informative warning when only starting the master process in daemon mode

Lasse Karstensen lkarsten at varnish-software.com
Mon Sep 22 16:38:25 CEST 2014


commit 1c4e35f838f2e969dfc186c3b0fc9f3f8fbdd782
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Fri Aug 29 15:47:47 2014 +0200

    Add an informative warning when only starting the master process in daemon mode
    
    Fixes #1580

diff --git a/bin/varnishd/mgt/mgt_main.c b/bin/varnishd/mgt/mgt_main.c
index ea7f950..28b4823 100644
--- a/bin/varnishd/mgt/mgt_main.c
+++ b/bin/varnishd/mgt/mgt_main.c
@@ -661,6 +661,12 @@ main(int argc, char * const *argv)
 		if (MGT_open_sockets())
 			ARGV_ERR("Failed to open (any) accept sockets.\n");
 		MGT_close_sockets();
+
+		if (b_arg == NULL && f_arg == NULL) {
+			fprintf(stderr,
+			    "Warning: Neither -b nor -f given, won't start a worker child.\n"
+			    "         Master process started, use varnishadm to control it.\n");
+		}
 	}
 
 	/* If no -s argument specified, process default -s argument */



More information about the varnish-commit mailing list