aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shell/ash.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 7fa75721e..b29927a83 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -15242,14 +15242,18 @@ trapcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
15242 // trap '' INT disables Ctrl-C, anything else enables it 15242 // trap '' INT disables Ctrl-C, anything else enables it
15243 if (action && action[0] == '\0') { 15243 if (action && action[0] == '\0') {
15244 SetConsoleCtrlHandler(NULL, TRUE); 15244 SetConsoleCtrlHandler(NULL, TRUE);
15245# if ENABLE_FEATURE_EDITING
15245 if (line_input_state) { 15246 if (line_input_state) {
15246 line_input_state->flags |= IGNORE_CTRL_C; 15247 line_input_state->flags |= IGNORE_CTRL_C;
15247 } 15248 }
15249# endif
15248 } else { 15250 } else {
15249 SetConsoleCtrlHandler(NULL, FALSE); 15251 SetConsoleCtrlHandler(NULL, FALSE);
15252# if ENABLE_FEATURE_EDITING
15250 if (line_input_state) { 15253 if (line_input_state) {
15251 line_input_state->flags &= ~IGNORE_CTRL_C; 15254 line_input_state->flags &= ~IGNORE_CTRL_C;
15252 } 15255 }
15256# endif
15253 } 15257 }
15254 } 15258 }
15255#else 15259#else