[master] d79cdee create secret file before daemonizing so we have a chance to see an error

Nils Goroll nils.goroll at uplex.de
Fri Mar 13 14:30:06 CET 2015


commit d79cdeed1ae66e9035ad8b3cdd0ecbac1f291f19
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Fri Mar 13 14:28:45 2015 +0100

    create secret file before daemonizing so we have a chance to see an error

diff --git a/bin/varnishd/mgt/mgt_main.c b/bin/varnishd/mgt/mgt_main.c
index b7fc72f..9493fe2 100644
--- a/bin/varnishd/mgt/mgt_main.c
+++ b/bin/varnishd/mgt/mgt_main.c
@@ -657,6 +657,10 @@ main(int argc, char * const *argv)
 
 	AZ(VSB_finish(vident));
 
+	if (S_arg == NULL)
+		S_arg = make_secret(dirname);
+	AN(S_arg);
+
 	if (!d_flag && !F_flag)
 		AZ(varnish_daemon(1, 0));
 
@@ -675,10 +679,6 @@ main(int argc, char * const *argv)
 	if (d_flag)
 		mgt_cli_setup(0, 1, 1, "debug", cli_stdin_close, NULL);
 
-	if (S_arg == NULL)
-		S_arg = make_secret(dirname);
-	AN(S_arg);
-
 	if (*S_arg != '\0')
 		mgt_cli_secret(S_arg);
 



More information about the varnish-commit mailing list