diff options
Diffstat (limited to 'shell')
| -rw-r--r-- | shell/ash.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/shell/ash.c b/shell/ash.c index be5f3f6e4..1c14f396c 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
| @@ -4228,6 +4228,7 @@ waitpid_child(int *status, int wait_flags) | |||
| 4228 | *status = (int)win_status; | 4228 | *status = (int)win_status; |
| 4229 | return pid; | 4229 | return pid; |
| 4230 | } | 4230 | } |
| 4231 | #define waitpid(p, s, f) waitpid_child(s, f) | ||
| 4231 | #endif | 4232 | #endif |
| 4232 | 4233 | ||
| 4233 | static int | 4234 | static int |
| @@ -4245,11 +4246,7 @@ dowait(int wait_flags, struct job *job) | |||
| 4245 | * NB: _not_ safe_waitpid, we need to detect EINTR */ | 4246 | * NB: _not_ safe_waitpid, we need to detect EINTR */ |
| 4246 | if (doing_jobctl) | 4247 | if (doing_jobctl) |
| 4247 | wait_flags |= WUNTRACED; | 4248 | wait_flags |= WUNTRACED; |
| 4248 | #if ENABLE_PLATFORM_MINGW32 | ||
| 4249 | pid = waitpid_child(&status, wait_flags); | ||
| 4250 | #else | ||
| 4251 | pid = waitpid(-1, &status, wait_flags); | 4249 | pid = waitpid(-1, &status, wait_flags); |
| 4252 | #endif | ||
| 4253 | TRACE(("wait returns pid=%d, status=0x%x, errno=%d(%s)\n", | 4250 | TRACE(("wait returns pid=%d, status=0x%x, errno=%d(%s)\n", |
| 4254 | pid, status, errno, strerror(errno))); | 4251 | pid, status, errno, strerror(errno))); |
| 4255 | if (pid <= 0) | 4252 | if (pid <= 0) |
