Skip to content

Commit 97ae972

Browse files
Merge branch '5.4' into 6.2
* 5.4: [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: [Notifier] Update AmazonSns url in doc from de to en [PropertyInfo] Fix `PhpStanExtractor` when constructor has no docblock
2 parents b34cdbc + e3c46cc commit 97ae972

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
@@ -421,7 +421,7 @@ public function wait(callable $callback = null): int
421421

422422
do {
423423
$this->checkTimeout();
424-
$running = '\\' === \DIRECTORY_SEPARATOR ? $this->isRunning() : $this->processPipes->areOpen();
424+
$running = $this->isRunning() && ('\\' === \DIRECTORY_SEPARATOR || $this->processPipes->areOpen());
425425
$this->readPipes($running, '\\' !== \DIRECTORY_SEPARATOR || !$running);
426426
} while ($running);
427427

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
/**
15401550
* @param string|array $commandline
15411551
* @param mixed $input

0 commit comments

Comments
 (0)