8000 bug #17177 [Process] Fix potential race condition leading to transien… · symfony/symfony@ddf11f5 · GitHub
[go: up one dir, main page]

Skip to content

Commit ddf11f5

Browse files
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
2 parents 06eec9d + 99fc428 commit ddf11f5

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/Symfony/Component/Process/Process.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,13 +1072,10 @@ private function readPipes($blocking, $close)
10721072

10731073
$callback = $this->callback;
10741074
foreach ($result as $type => $data) {
1075-
if (3 === $type) {
1076-
$this->fallbackStatus['running'] = false;
1077-
if (!isset($this->fallbackStatus['signaled'])) {
1078-
$this->fallbackStatus['exitcode'] = (int) $data;
1079-
}
1080-
} else {
1075+
if (3 !== $type) {
10811076
$callback($type === self::STDOUT ? self::OUT : self::ERR, $data);
1077+
} elseif (!isset($this->fallbackStatus['signaled'])) {
1078+
$this->fallbackStatus['exitcode'] = (int) $data;
10821079
}
10831080
}
10841081
}

0 commit comments

Comments
 (0)
0