Homec4science

Add basic remote console support

Authored by epriestley <git@epriestley.com> on Jun 25 2012, 20:17.

Description

Add basic remote console support

Summary:
This is a more practical example built on top of D2836. The lint_mock.php is a functional example that simulates a process very similar to what we're after.

When lint_mock.php starts, it launches a background process that simulates lint, then sleeps for 5 seconds to simulate editing a file. The background process randomly prompts the user for input.

After the 5 second "file editing" phase, the foreground process starts a console server for the background process and essentially lets it take over control of stdout/stdin/stderr. Any work the background process has done is printed, and the background process can now interact with the user. If it needed to prompt them, it will be waiting for input; if it didn't, it will have made substantial progress while the user was "editing a file".

Test Plan: Ran lint_mock.php, got sensible behavior.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D2841

Details

Committed
epriestley <git@epriestley.com>Jun 25 2012, 20:17
Pushed
aubortMar 17 2017, 12:03
Parents
rPHUfbef026782cc: Implement PhutilPHPObjectProtocolChannel and other channel changes
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHU5fa76b5936e7: Add basic remote console support (authored by epriestley <git@epriestley.com>).Jun 25 2012, 20:17