[PATCH 16/19] telnet: handle SIGINT
Florian Fainelli
florian at alphacore.org
Tue Sep 25 12:06:15 UTC 2012
From: Hasmish Guthrie <hcg at openwrt.org>
Default behavior for a non-interactive shell is that SIGINT is processeld
locally by the shell (and typically ignored), this runtime environment is
inherited by children, hence Ctrl-C has no effect within a telnet session.
This patch enables the correct behavior.
Signed-off-by: Hamish Guthrie <hcg at openwrt.org>
---
networking/telnetd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/networking/telnetd.c b/networking/telnetd.c
index 9e7a84c..615533d 100644
--- a/networking/telnetd.c
+++ b/networking/telnetd.c
@@ -331,6 +331,7 @@ make_new_session(
/* Restore default signal handling ASAP */
bb_signals((1 << SIGCHLD) + (1 << SIGPIPE), SIG_DFL);
+ signal(SIGINT, SIG_DFL);
pid = getpid();
--
1.7.9.5
More information about the busybox
mailing list