diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-10-27 20:30:04 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-10-27 20:30:04 +0000 |
commit | 5f13d6461b2018ccbeea46203d271d590e22638c (patch) | |
tree | 26852b35b23b5cdde07f735d6e360b2ad4633e4e /llvm/lib/Support/Unix/Program.inc | |
parent | b494e5d19893cf137a5e0576079968f1b86a8a28 (diff) | |
download | bcm5719-llvm-5f13d6461b2018ccbeea46203d271d590e22638c.tar.gz bcm5719-llvm-5f13d6461b2018ccbeea46203d271d590e22638c.zip |
Fix bug where sys::Wait could wait on wrong pid.
Setting ChildPid to -1 would cause waitpid to wait for any child process.
Patch by Daniel Reynaud!
llvm-svn: 220717
Diffstat (limited to 'llvm/lib/Support/Unix/Program.inc')
-rw-r--r-- | llvm/lib/Support/Unix/Program.inc | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/llvm/lib/Support/Unix/Program.inc b/llvm/lib/Support/Unix/Program.inc index 905c78f79bc..7bf6eceda73 100644 --- a/llvm/lib/Support/Unix/Program.inc +++ b/llvm/lib/Support/Unix/Program.inc @@ -335,7 +335,6 @@ ProcessInfo sys::Wait(const ProcessInfo &PI, unsigned SecondsToWait, pid_t ChildPid = PI.Pid; if (WaitUntilTerminates) { SecondsToWait = 0; - ChildPid = -1; // mimic a wait() using waitpid() } else if (SecondsToWait) { // Install a timeout handler. The handler itself does nothing, but the // simple fact of having a handler at all causes the wait below to return |