bug #17177 [Process] Fix potential race condition leading to transient tests (nicolas-grekas)
This PR was merged into the 2.3 branch.
Discussion
----------
[Process] Fix potential race condition leading to transient tests
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #15617
| License | MIT
| Doc PR | -
Sibling of #17176 on 2.3
Commits
-------
99fc428
[Process] Fix potential race condition leading to transient tests
This commit is contained in:
commit
ddf11f5b8a
@ -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