1
0
mirror of https://github.com/danog/process.git synced 2024-11-26 12:14:43 +01:00

Leave stdin in socket array

This commit is contained in:
Aaron Piotrowski 2017-12-10 12:34:06 -06:00
parent 93dc41c5dd
commit 57b7751768
No known key found for this signature in database
GPG Key ID: ADD1EF783EDE9EEB

View File

@ -211,7 +211,7 @@ final class SocketConnector {
$deferreds = $handle->stdioDeferreds;
$handle->stdioDeferreds = []; // clear, so there's no double resolution if process spawn fails
$sockets = $handle->sockets;
$handle->sockets = [];
$handle->sockets = [$sockets[0]]; // Leave stdin in array.
$deferreds[0]->resolve(new ResourceOutputStream($sockets[0]));
$deferreds[1]->resolve(new ResourceInputStream($sockets[1]));