Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnishevent
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
varnishevent
Commits
f2d8d93b
Commit
f2d8d93b
authored
Apr 17, 2015
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support -D option (daemonization)
parent
b5718f17
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
varnishevent.c
src/varnishevent.c
+13
-5
No files found.
src/varnishevent.c
View file @
f2d8d93b
...
...
@@ -415,9 +415,8 @@ usage(void)
int
main
(
int
argc
,
char
*
argv
[])
{
int
c
,
errnum
,
status
,
a_flag
=
0
,
v_flag
=
0
,
d_flag
=
0
;
int
c
,
errnum
,
status
,
a_flag
=
0
,
v_flag
=
0
,
d_flag
=
0
,
D_flag
=
0
;
#if 0
int D_flag = 0;
const char *P_arg = NULL;
#endif
char
*
w_arg
=
NULL
,
*
q_arg
=
NULL
,
*
g_arg
=
NULL
;
...
...
@@ -447,10 +446,15 @@ main(int argc, char *argv[])
case
'F'
:
strcpy
(
config
.
cformat
,
optarg
);
break
;
#if 0
case
'D'
:
#ifdef HAVE_DAEMON
D_flag
=
1
;
#else
fprintf
(
stderr
,
"-D not supported"
);
exit
(
EXIT_FAILURE
);
#endif
break
;
#if 0
case 'P':
P_arg = optarg;
break;
...
...
@@ -502,14 +506,18 @@ main(int argc, char *argv[])
perror(P_arg);
exit(1);
}
#endif
if (D_flag && varnish_daemon(0, 0) == -1) {
#ifdef HAVE_DAEMON
if
(
D_flag
&&
daemon
(
0
,
0
)
==
-
1
)
{
perror
(
"daemon()"
);
#if 0
if (pfh != NULL)
VPF_Remove(pfh);
#endif
exit
(
1
);
}
#endif
#endif
if
(
LOG_Open
(
config
.
syslog_ident
)
!=
0
)
{
exit
(
EXIT_FAILURE
);
...
...
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