Skip to content

Commit 8741e3e

Browse files
Merge branch '6.2' into 6.3
* 6.2: [Serializer] Fix SerializedPath not working with constructor arguments [FrameworkBundle] Fix Workflow without a marking store definition uses marking store definition of previously defined workflow [HttpFoundation] UrlHelper is now aware of RequestContext changes UrlHelper is now aware of RequestContext changes [Process] Stop the process correctly even if underlying input stream is not closed: Fix get sender name in turbosms notifier [Notifier] Update AmazonSns url in doc from de to en [PropertyInfo] Fix `PhpStanExtractor` when constructor has no docblock [PropertyAccess] Fix nullsafe operator on array index
2 parents 89ac295 + 97ae972 commit 8741e3e

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Process.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ public function wait(callable $callback = null): int
423423

424424
do {
425425
$this->checkTimeout();
426-
$running = '\\' === \DIRECTORY_SEPARATOR ? $this->isRunning() : $this->processPipes->areOpen();
426+
$running = $this->isRunning() && ('\\' === \DIRECTORY_SEPARATOR || $this->processPipes->areOpen());
427427
$this->readPipes($running, '\\' !== \DIRECTORY_SEPARATOR || !$running);
428428
} while ($running);
429429

Tests/ProcessTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1536,6 +1536,16 @@ public function testEnvCaseInsensitiveOnWindows()
15361536
}
15371537
}
15381538

1539+
public function testNotTerminableInputPipe()
1540+
{
1541+
$process = $this->getProcess('echo foo');
1542+
$process->setInput(\STDIN);
1543+
$process->start();
1544+
$process->setTimeout(2);
1545+
$process->wait();
1546+
$this->assertFalse($process->isRunning());
1547+
}
1548+
15391549
private function getProcess(string|array $commandline, string $cwd = null, array $env = null, mixed $input = null, ?int $timeout = 60): Process
15401550
{
15411551
if (\is_string($commandline)) {

0 commit comments

Comments
 (0)