mirror of
https://github.com/systemd/systemd.git
synced 2024-11-23 18:23:32 +08:00
main: ignore SIGKILL and SIGPIPE so that nothing intereferes with us
This commit is contained in:
parent
5373d60204
commit
078e453981
4
main.c
4
main.c
@ -387,6 +387,10 @@ int main(int argc, char *argv[]) {
|
||||
/* Reset all signal handlers. */
|
||||
assert_se(reset_all_signal_handlers() == 0);
|
||||
|
||||
/* If we are init, we can block sigkill. Yay. */
|
||||
signal(SIGKILL, SIG_IGN);
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
|
||||
/* Close all open files */
|
||||
assert_se(close_all_fds(NULL, 0) == 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user