diff options
author | Erik Andersen <andersen@codepoet.org> | 2000-01-26 20:06:48 +0000 |
---|---|---|
committer | Erik Andersen <andersen@codepoet.org> | 2000-01-26 20:06:48 +0000 |
commit | 5cbdd712f5320ffc109053a94b7cf36c82292cf6 (patch) | |
tree | 77236e83cc0583411a75b752a6152d445eb680e0 /init | |
parent | 3fe39dce5d1a0b0946878c66bbd7f694c5aa38ea (diff) | |
download | busybox-w32-5cbdd712f5320ffc109053a94b7cf36c82292cf6.tar.gz busybox-w32-5cbdd712f5320ffc109053a94b7cf36c82292cf6.tar.bz2 busybox-w32-5cbdd712f5320ffc109053a94b7cf36c82292cf6.zip |
mount and umount could leak loop device allocations causing the system to
quickly run out. Also disable init's SIGHUP handler during shutdown.
-Erik
Diffstat (limited to 'init')
-rw-r--r-- | init/init.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/init/init.c b/init/init.c index 5b80cc561..09540ff01 100644 --- a/init/init.c +++ b/init/init.c | |||
@@ -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"); |