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: IPC message forwarding #27

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

Move the start of the IPC message forwarding to its own function.

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.

isaacs commented 5 years ago

This looks good to me, but fails test coverage.

demurgos commented 5 years ago

This should be a cross-platform feature. The failure is caused by the lack of tests for the clean-up when cancelling the proxy. I'll add some tests.

bcoe commented 5 years ago

@demurgos 👋 is this is still something you'd like to land feel free to reopen, it just needs some tests added and we could see it over the finish line.