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
5cfe903c
Commit
5cfe903c
authored
Nov 15, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Combine two small functions
parent
e7694ea9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
11 deletions
+3
-11
mgt_child.c
bin/varnishd/mgt/mgt_child.c
+3
-11
No files found.
bin/varnishd/mgt/mgt_child.c
View file @
5cfe903c
...
@@ -424,21 +424,14 @@ mgt_stop_child(void)
...
@@ -424,21 +424,14 @@ mgt_stop_child(void)
/*--------------------------------------------------------------------*/
/*--------------------------------------------------------------------*/
static
void
static
void
mgt_
report_panic
(
pid_t
r
)
mgt_
handle_panicstr
(
pid_t
r
)
{
{
char
time_str
[
30
];
if
(
VSM_head
->
panicstr
[
0
]
==
'\0'
)
if
(
VSM_head
->
panicstr
[
0
]
==
'\0'
)
return
;
return
;
REPORT
(
LOG_ERR
,
"Child (%jd) Panic message: %s"
,
REPORT
(
LOG_ERR
,
"Child (%jd) Panic message: %s"
,
(
intmax_t
)
r
,
VSM_head
->
panicstr
);
(
intmax_t
)
r
,
VSM_head
->
panicstr
);
}
static
void
mgt_save_panic
(
void
)
{
char
time_str
[
30
];
if
(
VSM_head
->
panicstr
[
0
]
==
'\0'
)
return
;
if
(
child_panic
)
if
(
child_panic
)
VSB_delete
(
child_panic
);
VSB_delete
(
child_panic
);
...
@@ -500,8 +493,7 @@ mgt_sigchld(const struct vev *e, int what)
...
@@ -500,8 +493,7 @@ mgt_sigchld(const struct vev *e, int what)
REPORT
(
LOG_INFO
,
"%s"
,
VSB_data
(
vsb
));
REPORT
(
LOG_INFO
,
"%s"
,
VSB_data
(
vsb
));
VSB_delete
(
vsb
);
VSB_delete
(
vsb
);
mgt_report_panic
(
r
);
mgt_handle_panicstr
(
r
);
mgt_save_panic
();
child_pid
=
-
1
;
child_pid
=
-
1
;
...
...
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