Skip to content

Commit

Permalink
Merge branch '5.4' into 6.2
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
nicolas-grekas committed May 19, 2023
2 parents b34cdbc + e3c46cc commit 97ae972
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ public function wait(callable $callback = null): int

do {
$this->checkTimeout();
$running = '\\' === \DIRECTORY_SEPARATOR ? $this->isRunning() : $this->processPipes->areOpen();
$running = $this->isRunning() && ('\\' === \DIRECTORY_SEPARATOR || $this->processPipes->areOpen());
$this->readPipes($running, '\\' !== \DIRECTORY_SEPARATOR || !$running);
} while ($running);

Expand Down
10 changes: 10 additions & 0 deletions Tests/ProcessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1536,6 +1536,16 @@ public function testEnvCaseInsensitiveOnWindows()
}
}

public function testNotTerminableInputPipe()
{
$process = $this->getProcess('echo foo');
$process->setInput(\STDIN);
$process->start();
$process->setTimeout(2);
$process->wait();
$this->assertFalse($process->isRunning());
}

/**
* @param string|array $commandline
* @param mixed $input
Expand Down

0 comments on commit 97ae972

Please sign in to comment.