summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System/Unix/Program.inc
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/System/Unix/Program.inc')
-rw-r--r--llvm/lib/System/Unix/Program.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/System/Unix/Program.inc b/llvm/lib/System/Unix/Program.inc
index 56dea250a77..c52f3a88c04 100644
--- a/llvm/lib/System/Unix/Program.inc
+++ b/llvm/lib/System/Unix/Program.inc
@@ -244,7 +244,7 @@ Program::Wait(unsigned secondsToWait,
int status;
uint64_t pid = reinterpret_cast<uint64_t>(Data_);
pid_t child = static_cast<pid_t>(pid);
- while (wait(&status) != child)
+ while (waitpid(pid, &status, 0) != child)
if (secondsToWait && errno == EINTR) {
// Kill the child.
kill(child, SIGKILL);
OpenPOWER on IntegriCloud