diff options
author | Ron Yorston <rmy@pobox.com> | 2016-05-18 14:17:37 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2016-05-18 14:17:37 +0100 |
commit | ee8fdaa48da144585aacdf2a34a82f4cbc5dab02 (patch) | |
tree | 0db52d4ec3e074fd8550b2e399d325f809cdf766 | |
parent | c7c05c8e5723ed833ed0e73d24d7f7c45169c6e9 (diff) | |
download | busybox-w32-ee8fdaa48da144585aacdf2a34a82f4cbc5dab02.tar.gz busybox-w32-ee8fdaa48da144585aacdf2a34a82f4cbc5dab02.tar.bz2 busybox-w32-ee8fdaa48da144585aacdf2a34a82f4cbc5dab02.zip |
ash: use a macro to substitute waitpid_child for waitpid
-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) |