summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-04-13 02:01:28 +0200
committerLennart Poettering <lennart@poettering.net>2010-04-13 02:01:28 +0200
commit078e45398127cfef1c146d39f634c45cbfee1b28 (patch)
treeb34747740b79b93a6ca016252cbce551fa5debe1 /main.c
parent5373d6020426671680704d2f573f82c1659852da (diff)
main: ignore SIGKILL and SIGPIPE so that nothing intereferes with us
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main.c b/main.c
index 9323d45f73..7dbcc90d5e 100644
--- a/main.c
+++ b/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);