tapjs / foreground-child

Run a child as if it's the foreground process. Give it stdio. Exit when it exits.
http://tapjs.github.io/foreground-child/
ISC License
40 stars 14 forks source link

refactor: add `proxyStdio` internal function #28

Closed demurgos closed 5 years ago

demurgos commented 6 years ago

Why

foregroundChild is currently hard-coded to only support forwarding with the root process. To support a general proxy function between any two objects behaving like processes, we can begin by refactoring the internals to be more parametrized.

What

Add a function to start forwarding standard IO. This function is unused at the moment because foregroundChild defaults to using the stdio: "inherit" spawn option, causing the std streams to be null on the child process.

demurgos commented 6 years ago

The CI failure seems to be an Appveyor issue (issue in their npm package). Fixed in https://github.com/tapjs/foreground-child/pull/24.

demurgos commented 5 years ago

Closing for now. There's no sens to add an unused function. I'll submit it with the corresponding code actually using it.