[master] 6fb5763 Move the acceptor sockets open/bind test earlier.
Poul-Henning Kamp
phk at FreeBSD.org
Mon Mar 16 09:55:34 CET 2015
commit 6fb576391905f49a89402f26c5f446e532b46632
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Mar 16 08:41:28 2015 +0000
Move the acceptor sockets open/bind test earlier.
diff --git a/bin/varnishd/mgt/mgt_main.c b/bin/varnishd/mgt/mgt_main.c
index 4ebc6b3..325b88d 100644
--- a/bin/varnishd/mgt/mgt_main.c
+++ b/bin/varnishd/mgt/mgt_main.c
@@ -619,6 +619,10 @@ main(int argc, char * const *argv)
ARGV_ERR("Could not open pid/lock (-P) file (%s): %s\n",
P_arg, strerror(errno));
+ if (MAC_open_sockets())
+ ARGV_ERR("Failed to open (any) accept sockets.\n");
+ MAC_close_sockets();
+
mgt_vcc_init();
mgt_vcl_init();
@@ -635,10 +639,6 @@ main(int argc, char * const *argv)
ARGV_ERR("-C only good with -b or -f\n");
if (!d_flag) {
- if (MAC_open_sockets())
- ARGV_ERR("Failed to open (any) accept sockets.\n");
- MAC_close_sockets();
-
if (b_arg == NULL && f_arg == NULL) {
fprintf(stderr,
"Warning: Neither -b nor -f given,"
More information about the varnish-commit
mailing list