From ee8fdaa48da144585aacdf2a34a82f4cbc5dab02 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Wed, 18 May 2016 14:17:37 +0100 Subject: ash: use a macro to substitute waitpid_child for waitpid --- shell/ash.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'shell') 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) *status = (int)win_status; return pid; } +#define waitpid(p, s, f) waitpid_child(s, f) #endif static int @@ -4245,11 +4246,7 @@ dowait(int wait_flags, struct job *job) * NB: _not_ safe_waitpid, we need to detect EINTR */ if (doing_jobctl) wait_flags |= WUNTRACED; -#if ENABLE_PLATFORM_MINGW32 - pid = waitpid_child(&status, wait_flags); -#else pid = waitpid(-1, &status, wait_flags); -#endif TRACE(("wait returns pid=%d, status=0x%x, errno=%d(%s)\n", pid, status, errno, strerror(errno))); if (pid <= 0) -- cgit v1.2.3-55-g6feb