Homec4science

Fix an issue in ExecFuture where stdin will be prematurely discarded

Authored by epriestley <git@epriestley.com> on Jul 29 2011, 05:50.

Description

Fix an issue in ExecFuture where stdin will be prematurely discarded

Summary:
Right now, if you do something like run cat and write to it, and then call
isReady(), it will close the pipe even if you specify $keep_pipe = true.

This is a somewhat unusual use case but I need it to do passthru I/O for
sshd-vcs.

This changes the normal behavior slightly: previously, we would have NULL'd out
stdin but not closed it. Now we do not NULL it out.

HPHP had some weird bugs with this stuff a few months ago but IIRC it all got
sorted out before I left.

Test Plan:

  • Built metered passthru I/O for sshd-vcs and it works correctly instead of

throwing away stdin after the first write.

  • Ran 'arc diff' which execs a bunch of other commands as a coarse backward

compatibility test.

Reviewed By: jungejason
Reviewers: jungejason, tuomaspelkonen, aran
CC: aran, epriestley, jungejason
Differential Revision: 739

Details

Committed
epriestley <git@epriestley.com>Aug 2 2011, 00:59
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU74b99cc33349: Provide Filesystem::getUniqueFilename()
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHU1032d74db0e1: Fix an issue in ExecFuture where stdin will be prematurely discarded (authored by epriestley <git@epriestley.com>).Aug 2 2011, 00:59