[Process] Fix potential race condition leading to transient tests
This commit is contained in:
parent
06eec9d39f
commit
99fc428bdc
@ -1072,13 +1072,10 @@ class Process
|
|||||||
|
|
||||||
$callback = $this->callback;
|
$callback = $this->callback;
|
||||||
foreach ($result as $type => $data) {
|
foreach ($result as $type => $data) {
|
||||||
if (3 === $type) {
|
if (3 !== $type) {
|
||||||
$this->fallbackStatus['running'] = false;
|
|
||||||
if (!isset($this->fallbackStatus['signaled'])) {
|
|
||||||
$this->fallbackStatus['exitcode'] = (int) $data;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$callback($type === self::STDOUT ? self::OUT : self::ERR, $data);
|
$callback($type === self::STDOUT ? self::OUT : self::ERR, $data);
|
||||||
|
} elseif (!isset($this->fallbackStatus['signaled'])) {
|
||||||
|
$this->fallbackStatus['exitcode'] = (int) $data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user