ProcessManager.collectCommandOutput

Run a command and pass its output to a callback

Run a command with the supplied command line. Call outputProcessor whenever the command outputs anything on stdout or stderr.

In addition to those, outputProcessor gets called three more times. The first time is right before the process is started (with output set to empty). This allows outputProcessor to do any additional manipulations (such as redirecting the input). This can be tested for because child.pid is 0.

The second time is when the output closes. Again, this call will have a output set to an empty range.

The third time is after the process has already exit. This can be tested for because child.isAlive will be false.

struct ProcessManager
void
collectCommandOutput

Meta