summaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
authorDenys Vlasenko2012-09-06 13:28:10 +0200
committerDenys Vlasenko2012-09-06 13:28:10 +0200
commit9e71e3cea59c06d40234d8f3363c3f05112e8d5a (patch)
tree1a483c9e1482fa83465563f15f1ad2ecaef22e98 /shell/ash.c
parent50157f3decce78d3172314a5f97363faedba565a (diff)
downloadbusybox-9e71e3cea59c06d40234d8f3363c3f05112e8d5a.zip
busybox-9e71e3cea59c06d40234d8f3363c3f05112e8d5a.tar.gz
ash: fix "read -s" + ^C. Closes 5504
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c
index b20c32b..153bcc0 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -12803,6 +12803,10 @@ readcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
}
}
+ /* "read -s" needs to save/restore termios, can't allow ^C
+ * to jump out of it.
+ */
+ INT_OFF;
r = shell_builtin_read(setvar2,
argptr,
bltinlookup("IFS"), /* can be NULL */
@@ -12812,6 +12816,7 @@ readcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
opt_t,
opt_u
);
+ INT_ON;
if ((uintptr_t)r > 1)
ash_msg_and_raise_error(r);