minor fix for SIGHUP handling
This commit is contained in:
parent
89a6e5007d
commit
3789d199a7
|
@ -40,6 +40,14 @@ static void quit_now(int notused)
|
|||
http_close_port(mmc->incoming.port);
|
||||
}
|
||||
|
||||
/* manage the SIGHUP signal */
|
||||
static void relog_now(int notused)
|
||||
{
|
||||
warning(0, "SIGHUP received, catching and re-opening logs");
|
||||
log_reopen();
|
||||
alog_reopen();
|
||||
}
|
||||
|
||||
/* Finds text part, returns copy. */
|
||||
static MIMEEntity *find_textpart(MIMEEntity *m)
|
||||
{
|
||||
|
@ -576,7 +584,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
mms_cfg_destroy(cfg);
|
||||
|
||||
signal(SIGHUP, quit_now);
|
||||
signal(SIGHUP, relog_now);
|
||||
signal(SIGTERM, quit_now);
|
||||
signal(SIGPIPE,SIG_IGN); /* Ignore pipe errors. They kill us sometimes for nothing*/
|
||||
|
||||
|
|
|
@ -52,6 +52,14 @@ static void quit_now(int notused)
|
|||
}
|
||||
}
|
||||
|
||||
/* manage the SIGHUP signal */
|
||||
static void relog_now(int notused)
|
||||
{
|
||||
warning(0, "SIGHUP received, catching and re-opening logs");
|
||||
log_reopen();
|
||||
alog_reopen();
|
||||
}
|
||||
|
||||
static void free_clientInfo(MmsHTTPClientInfo *h, int freeh);
|
||||
static void fetchmms_proxy(MmsHTTPClientInfo *h);
|
||||
static void sendmms_proxy(MmsHTTPClientInfo *h);
|
||||
|
@ -97,7 +105,7 @@ int main(int argc, char *argv[])
|
|||
panic(0, "No global MMSC configuration!");
|
||||
|
||||
|
||||
signal(SIGHUP, quit_now);
|
||||
signal(SIGHUP, relog_now);
|
||||
signal(SIGTERM, quit_now);
|
||||
|
||||
/* Start cache engine. */
|
||||
|
|
|
@ -23,6 +23,14 @@ static void quit_now(int notused)
|
|||
rstop = 1;
|
||||
}
|
||||
|
||||
/* manage the SIGHUP signal */
|
||||
static void relog_now(int notused)
|
||||
{
|
||||
warning(0, "SIGHUP received, catching and re-opening logs");
|
||||
log_reopen();
|
||||
alog_reopen();
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int cfidx;
|
||||
|
@ -63,7 +71,7 @@ int main(int argc, char *argv[])
|
|||
mms_start_profile_engine(octstr_get_cstr(settings->ua_profile_cache_dir));
|
||||
#endif
|
||||
|
||||
signal(SIGHUP, quit_now);
|
||||
signal(SIGHUP, relog_now);
|
||||
signal(SIGTERM, quit_now);
|
||||
signal(SIGPIPE,SIG_IGN); /* Ignore pipe errors. They kill us sometimes for nothing*/
|
||||
|
||||
|
|
Loading…
Reference in New Issue