Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
49da92a2
Commit
49da92a2
authored
Dec 22, 2016
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some minor deck-chair shuffling, while looking at the whole
startup situation.
parent
692c80bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
14 deletions
+19
-14
mgt_main.c
bin/varnishd/mgt/mgt_main.c
+19
-14
No files found.
bin/varnishd/mgt/mgt_main.c
View file @
49da92a2
...
...
@@ -486,6 +486,17 @@ identify(const char *i_arg)
openlog
(
p
,
LOG_PID
,
LOG_LOCAL0
);
}
static
void
startup_tests
(
void
)
{
assert
(
VTIM_parse
(
"Sun, 06 Nov 1994 08:49:37 GMT"
)
==
784111777
);
assert
(
VTIM_parse
(
"Sunday, 06-Nov-94 08:49:37 GMT"
)
==
784111777
);
assert
(
VTIM_parse
(
"Sun Nov 6 08:49:37 1994"
)
==
784111777
);
/* Check that our SHA256 works */
SHA256_Test
();
}
/*--------------------------------------------------------------------*/
int
...
...
@@ -514,6 +525,8 @@ main(int argc, char * const *argv)
int
jailed
=
0
;
char
Cn_arg
[]
=
"/tmp/varnishd_C_XXXXXXX"
;
startup_tests
();
/* Set up the mgt counters */
memset
(
&
static_VSC_C_mgt
,
0
,
sizeof
static_VSC_C_mgt
);
VSC_C_mgt
=
&
static_VSC_C_mgt
;
...
...
@@ -523,14 +536,12 @@ main(int argc, char * const *argv)
* have inherited from sloppy process control daemons.
*/
VSUB_closefrom
(
STDERR_FILENO
+
1
);
VRND_SeedAll
();
mgt_got_fd
(
STDERR_FILENO
);
setbuf
(
stdout
,
NULL
);
setbuf
(
stderr
,
NULL
);
VRND_SeedAll
();
build_vident
();
Symbol_hack
(
argv
[
0
]);
...
...
@@ -538,13 +549,6 @@ main(int argc, char * const *argv)
/* for ASSERT_MGT() */
mgt_pid
=
getpid
();
assert
(
VTIM_parse
(
"Sun, 06 Nov 1994 08:49:37 GMT"
)
==
784111777
);
assert
(
VTIM_parse
(
"Sunday, 06-Nov-94 08:49:37 GMT"
)
==
784111777
);
assert
(
VTIM_parse
(
"Sun Nov 6 08:49:37 1994"
)
==
784111777
);
/* Check that our SHA256 works */
SHA256_Test
();
/* Create a cli for convenience in otherwise CLI functions */
INIT_OBJ
(
cli
,
CLI_MAGIC
);
cli
[
0
].
sb
=
VSB_new_auto
();
...
...
@@ -560,6 +564,7 @@ main(int argc, char * const *argv)
mgt_evb
=
vev_new_base
();
AN
(
mgt_evb
);
/* Initialize transport protocols */
XPORT_Init
();
init_params
(
cli
);
...
...
@@ -578,9 +583,6 @@ main(int argc, char * const *argv)
continue
;
}
VJ_Init
(
NULL
);
}
else
{
if
(
o
==
'j'
)
ARGV_ERR
(
"
\t
-j must be the first argument
\n
"
);
}
switch
(
o
)
{
...
...
@@ -608,6 +610,9 @@ main(int argc, char * const *argv)
case
'i'
:
i_arg
=
optarg
;
break
;
case
'j'
:
ARGV_ERR
(
"
\t
-j must be the first argument
\n
"
);
break
;
case
'l'
:
av
=
VAV_Parse
(
optarg
,
NULL
,
ARGV_COMMA
);
AN
(
av
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment