From: Ben Gras Date: Mon, 10 Apr 2006 00:29:34 +0000 (+0000) Subject: Kill everyone even in tinyhalt. This causes tty to important clean up. X-Git-Tag: v3.1.2a~36 X-Git-Url: http://zhaoyanbai.com/repos/man.arpaname.html?a=commitdiff_plain;h=f8b66e3d7948b3b2cfe17d8adcd257c31b5ea97e;p=minix.git Kill everyone even in tinyhalt. This causes tty to important clean up. --- diff --git a/commands/reboot/tinyhalt.c b/commands/reboot/tinyhalt.c index 9ae91eba3..80ce03f04 100755 --- a/commands/reboot/tinyhalt.c +++ b/commands/reboot/tinyhalt.c @@ -11,6 +11,7 @@ #include #include #include +#include int main(int argc, char **argv) { @@ -27,7 +28,12 @@ int main(int argc, char **argv) if ((prog = strrchr(*argv,'/')) == nil) prog= argv[0]; else prog++; - sleep(2); /* Not too fast. */ + sleep(1); /* Not too fast. */ + signal(SIGHUP, SIG_IGN); + signal(SIGTERM, SIG_IGN); + kill(1, SIGTERM); + kill(-1, SIGTERM); + sleep(1); reboot(strcmp(prog, "reboot") == 0 ? RBT_MONITOR : RBT_HALT, reboot_code, strlen(reboot_code));