diff options
Diffstat (limited to 'init.c')
-rw-r--r-- | init.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -359,6 +359,7 @@ static pid_t run(char* command, | |||
359 | signal(SIGUSR2, SIG_DFL); | 359 | signal(SIGUSR2, SIG_DFL); |
360 | signal(SIGINT, SIG_DFL); | 360 | signal(SIGINT, SIG_DFL); |
361 | signal(SIGTERM, SIG_DFL); | 361 | signal(SIGTERM, SIG_DFL); |
362 | signal(SIGHUP, SIG_DFL); | ||
362 | 363 | ||
363 | if ((fd = device_open(terminal, O_RDWR)) < 0) { | 364 | if ((fd = device_open(terminal, O_RDWR)) < 0) { |
364 | message(LOG|CONSOLE, "Bummer, can't open %s\r\n", terminal); | 365 | message(LOG|CONSOLE, "Bummer, can't open %s\r\n", terminal); |
@@ -458,6 +459,9 @@ goodnight: | |||
458 | #ifndef DEBUG_INIT | 459 | #ifndef DEBUG_INIT |
459 | static void shutdown_system(void) | 460 | static void shutdown_system(void) |
460 | { | 461 | { |
462 | /* first disable our SIGHUP signal */ | ||
463 | signal(SIGHUP, SIG_DFL); | ||
464 | |||
461 | /* Allow Ctrl-Alt-Del to reboot system. */ | 465 | /* Allow Ctrl-Alt-Del to reboot system. */ |
462 | reboot(RB_ENABLE_CAD); | 466 | reboot(RB_ENABLE_CAD); |
463 | message(CONSOLE, "\r\nThe system is going down NOW !!\r\n"); | 467 | message(CONSOLE, "\r\nThe system is going down NOW !!\r\n"); |