diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2022-01-13 01:05:03 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2022-01-13 01:15:10 +0100 |
commit | 68b402ee51f12f8c3b11638b042f57e025359faf (patch) | |
tree | f7db9b14b44d89c448fd7d35cae821a97695f7f3 /loginutils | |
parent | d162a7b978a98b910e410dc10a40d5de12db0419 (diff) | |
download | busybox-w32-68b402ee51f12f8c3b11638b042f57e025359faf.tar.gz busybox-w32-68b402ee51f12f8c3b11638b042f57e025359faf.tar.bz2 busybox-w32-68b402ee51f12f8c3b11638b042f57e025359faf.zip |
ash: ^C with SIG_INGed SIGINT should not exit the shell
function old new delta
__pgetc 501 522 +21
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'loginutils')
-rw-r--r-- | loginutils/login.c | 4 | ||||
-rw-r--r-- | loginutils/sulogin.c | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/loginutils/login.c b/loginutils/login.c index 569053c12..cac4349b2 100644 --- a/loginutils/login.c +++ b/loginutils/login.c | |||
@@ -608,7 +608,9 @@ int login_main(int argc UNUSED_PARAM, char **argv) | |||
608 | * But without this, bash 3.0 will not enable ctrl-c either. | 608 | * But without this, bash 3.0 will not enable ctrl-c either. |
609 | * Maybe bash is buggy? | 609 | * Maybe bash is buggy? |
610 | * Need to find out what standards say about /bin/login - | 610 | * Need to find out what standards say about /bin/login - |
611 | * should we leave SIGINT etc enabled or disabled? */ | 611 | * should we leave SIGINT etc enabled or disabled? |
612 | * Also note: sulogin does not do it! Why? | ||
613 | */ | ||
612 | signal(SIGINT, SIG_DFL); | 614 | signal(SIGINT, SIG_DFL); |
613 | 615 | ||
614 | /* Exec login shell with no additional parameters */ | 616 | /* Exec login shell with no additional parameters */ |
diff --git a/loginutils/sulogin.c b/loginutils/sulogin.c index 5f1c1178f..2f87c77c0 100644 --- a/loginutils/sulogin.c +++ b/loginutils/sulogin.c | |||
@@ -111,6 +111,11 @@ int sulogin_main(int argc UNUSED_PARAM, char **argv) | |||
111 | } | 111 | } |
112 | } | 112 | } |
113 | 113 | ||
114 | /* | ||
115 | * Note: login does this (should we do it too?): | ||
116 | */ | ||
117 | /*signal(SIGINT, SIG_DFL);*/ | ||
118 | |||
114 | /* Exec login shell with no additional parameters. Never returns. */ | 119 | /* Exec login shell with no additional parameters. Never returns. */ |
115 | exec_login_shell(shell); | 120 | exec_login_shell(shell); |
116 | } | 121 | } |