diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2019-08-09 12:06:03 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2019-08-09 12:06:03 +0000 |
commit | 01b815a073101521e0b53cf4ce8fa9c81b5fc5d8 (patch) | |
tree | c0869507e4f2a58769493f028b8e0066790fcc32 /src/init | |
parent | 98e4d43adcf15235b1441bfb3163fc8305854493 (diff) | |
download | s6-linux-init-01b815a073101521e0b53cf4ce8fa9c81b5fc5d8.tar.xz |
Trap CAD in stage 1; prepare for 1.0.3.0
Diffstat (limited to 'src/init')
-rw-r--r-- | src/init/s6-linux-init.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/init/s6-linux-init.c b/src/init/s6-linux-init.c index 75c9eee..78cf3d0 100644 --- a/src/init/s6-linux-init.c +++ b/src/init/s6-linux-init.c @@ -7,6 +7,7 @@ #include <errno.h> #include <sys/stat.h> #include <sys/mount.h> +#include <sys/reboot.h> #include <skalibs/types.h> #include <skalibs/allreadwrite.h> @@ -19,7 +20,6 @@ #include <s6/config.h> #include <s6-linux-init/config.h> - #include "defaults.h" #include "initctl.h" @@ -181,6 +181,8 @@ int main (int argc, char const **argv, char const *const *envp) pid = fork() ; if (pid == -1) strerr_diefu1sys(111, "fork") ; if (!pid) run_stage2(basedir, argv, argc, newenvp, !!path, envmodifs.s, envmodifs.len, initdefault) ; + if (reboot(RB_DISABLE_CAD) == -1) + strerr_warnwu1sys("trap ctrl-alt-del") ; if (fd_copy(2, 1) == -1) strerr_diefu1sys(111, "redirect output file descriptor") ; xpathexec_r(newargv, newenvp, !!path, envmodifs.s, envmodifs.len) ; |