diff options
-rw-r--r-- | shell/ash.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c index 758187ccd..6a572cbc3 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -4308,8 +4308,8 @@ HANDLE hSIGINT; /* Ctrl-C is pressed */ | |||
4308 | static BOOL WINAPI ctrl_handler(DWORD dwCtrlType) | 4308 | static BOOL WINAPI ctrl_handler(DWORD dwCtrlType) |
4309 | { | 4309 | { |
4310 | if (dwCtrlType == CTRL_C_EVENT || dwCtrlType == CTRL_BREAK_EVENT) { | 4310 | if (dwCtrlType == CTRL_C_EVENT || dwCtrlType == CTRL_BREAK_EVENT) { |
4311 | SetEvent(hSIGINT); | ||
4312 | pending_int = 1; | 4311 | pending_int = 1; |
4312 | SetEvent(hSIGINT); | ||
4313 | return TRUE; | 4313 | return TRUE; |
4314 | } | 4314 | } |
4315 | return FALSE; | 4315 | return FALSE; |
@@ -4379,6 +4379,8 @@ waitpid_child(int *status, int wait_flags) | |||
4379 | free(pidlist); | 4379 | free(pidlist); |
4380 | free(proclist); | 4380 | free(proclist); |
4381 | *status = 128 + SIGINT; /* terminated by a signal */ | 4381 | *status = 128 + SIGINT; /* terminated by a signal */ |
4382 | if (iflag) | ||
4383 | write(STDOUT_FILENO, "^C", 2); | ||
4382 | return pid; | 4384 | return pid; |
4383 | } | 4385 | } |
4384 | GetExitCodeProcess(proclist[idx], &win_status); | 4386 | GetExitCodeProcess(proclist[idx], &win_status); |
@@ -15126,6 +15128,7 @@ forkshell_init(const char *idstr) | |||
15126 | 15128 | ||
15127 | reinitvar(); | 15129 | reinitvar(); |
15128 | 15130 | ||
15131 | shlvl++; | ||
15129 | forkshell_child(fs); | 15132 | forkshell_child(fs); |
15130 | } | 15133 | } |
15131 | 15134 | ||