Commit 5cfe903c authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Combine two small functions

parent e7694ea9
...@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment