Shell: Don't hang on empty stdin
authorBrad Jorsch <bjorsch@wikimedia.org>
Thu, 22 Feb 2018 22:13:28 +0000 (17:13 -0500)
committerBrad Jorsch <bjorsch@wikimedia.org>
Thu, 22 Feb 2018 22:13:28 +0000 (17:13 -0500)
commit86cfcfdbbaf67ca31b9e7fb7e71a238747a2b54a
tree1c5013cc29822c28488914b971a0f37770d2b5eb
parentf075c9eb8229876b9d6d329d68359e3984d1fedc
Shell: Don't hang on empty stdin

If the write buffer for a file descriptor is empty, don't try to write
to it. Just close it and continue on.

Bug: T188019
Change-Id: Ie5b5ac1ef1aec4ae763cf4d0d58d3a28e42b7d2a
includes/shell/Command.php
tests/phpunit/includes/shell/CommandTest.php