mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-15 23:57:48 +00:00
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
This commit is contained in:
parent
b3117b0b86
commit
01a14a8846
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user