mirror of
https://github.com/danog/parallel.git
synced 2024-12-02 09:37:57 +01:00
Unreference stderr reading, so it doesn't keep the loop running
This commit is contained in:
parent
8c726c67b6
commit
8ecfed57bf
@ -22,7 +22,7 @@
|
|||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"amphp/amp": "^2",
|
"amphp/amp": "^2",
|
||||||
"amphp/byte-stream": "^1",
|
"amphp/byte-stream": "^1.1",
|
||||||
"amphp/parser": "^1",
|
"amphp/parser": "^1",
|
||||||
"amphp/process": "^0.2"
|
"amphp/process": "^0.2"
|
||||||
},
|
},
|
||||||
|
@ -67,7 +67,9 @@ class ChannelledProcess implements ProcessContext, Strand {
|
|||||||
$this->process->start();
|
$this->process->start();
|
||||||
$this->channel = new ChannelledStream($this->process->getStdout(), $this->process->getStdin());
|
$this->channel = new ChannelledStream($this->process->getStdout(), $this->process->getStdin());
|
||||||
|
|
||||||
|
/** @var ByteStream\ResourceInputStream $childStderr */
|
||||||
$childStderr = $this->process->getStderr();
|
$childStderr = $this->process->getStderr();
|
||||||
|
$childStderr->unreference();
|
||||||
|
|
||||||
asyncCall(function () use ($childStderr) {
|
asyncCall(function () use ($childStderr) {
|
||||||
$stderr = new ByteStream\ResourceOutputStream(\STDERR);
|
$stderr = new ByteStream\ResourceOutputStream(\STDERR);
|
||||||
|
Loading…
Reference in New Issue
Block a user