Skip to content

Commit

Permalink
Unreference stderr reading, so it doesn't keep the loop running
Browse files Browse the repository at this point in the history
  • Loading branch information
kelunik committed Jun 23, 2017
1 parent 8c726c6 commit 8ecfed5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
],
"require": {
"amphp/amp": "^2",
"amphp/byte-stream": "^1",
"amphp/byte-stream": "^1.1",
"amphp/parser": "^1",
"amphp/process": "^0.2"
},
Expand Down
2 changes: 2 additions & 0 deletions lib/Process/ChannelledProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ public function start() {
$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);
Expand Down

0 comments on commit 8ecfed5

Please sign in to comment.