1
0
mirror of https://github.com/danog/parallel.git synced 2024-11-30 04:39:01 +01:00

Unreference stderr reading, so it doesn't keep the loop running

This commit is contained in:
Niklas Keller 2017-06-23 16:44:17 +02:00
parent 8c726c67b6
commit 8ecfed57bf
2 changed files with 3 additions and 1 deletions

View File

@ -22,7 +22,7 @@
],
"require": {
"amphp/amp": "^2",
"amphp/byte-stream": "^1",
"amphp/byte-stream": "^1.1",
"amphp/parser": "^1",
"amphp/process": "^0.2"
},

View File

@ -67,7 +67,9 @@ class ChannelledProcess implements ProcessContext, Strand {
$this->process->start();
$this->channel = new ChannelledStream($this->process->getStdout(), $this->process->getStdin());
/** @var ByteStream\ResourceInputStream $childStderr */
$childStderr = $this->process->getStderr();
$childStderr->unreference();
asyncCall(function () use ($childStderr) {
$stderr = new ByteStream\ResourceOutputStream(\STDERR);