chiark / gitweb /
main: ignore SIGKILL and SIGPIPE so that nothing intereferes with us
[elogind.git] / main.c
diff --git a/main.c b/main.c
index 9323d45f739fd62240b599dc184d608d6f6ccb3f..7dbcc90d5ebff9ae9695883782af49ddb7777975 100644 (file)
--- 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);