diff options
Diffstat (limited to 'shell')
| -rw-r--r-- | shell/ash.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c index c7c514417..586925835 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
| @@ -4472,7 +4472,15 @@ waitpid_child(int *status, int wait_flags) | |||
| 4472 | int i; | 4472 | int i; |
| 4473 | ResetEvent(hSIGINT); | 4473 | ResetEvent(hSIGINT); |
| 4474 | for (i = 1; i < pid_nr; i++) | 4474 | for (i = 1; i < pid_nr; i++) |
| 4475 | TerminateProcess(proclist[i], 1); | 4475 | kill_SIGTERM_by_handle(proclist[i], 128+SIGINT); |
| 4476 | Sleep(200); | ||
| 4477 | for (i = 1; i < pid_nr; i++) { | ||
| 4478 | DWORD code; | ||
| 4479 | if (GetExitCodeProcess(proclist[i], &code) && | ||
| 4480 | code == STILL_ACTIVE) { | ||
| 4481 | TerminateProcess(proclist[i], 128+SIGINT); | ||
| 4482 | } | ||
| 4483 | } | ||
| 4476 | pid = pidlist[1]; | 4484 | pid = pidlist[1]; |
| 4477 | free(pidlist); | 4485 | free(pidlist); |
| 4478 | free(proclist); | 4486 | free(proclist); |
