* systemd: SIGINT and SIGTERM signals return exit(0) to allow clean termination

This commit is contained in:
luuloe 2017-11-02 07:57:25 +00:00
parent e45f616520
commit bcc355c6be

View File

@ -149,5 +149,12 @@ sig_exec(void)
logw(2, "Terminated by signal: SIG%s", signames[sig_flag]);
#endif
/* currently simply exit the program */
exit(1);
switch(sig_flag)
{
case SIGINT:
case SIGTERM: // fall-through
exit(0);
default:
exit(1);
}
}