[DAEMON-79] appcd-subprocess: Add IPC support
| GitHub Issue | n/a |
|---|---|
| Type | New Feature |
| Priority | Critical |
| Status | Resolved |
| Resolution | Fixed |
| Resolution Date | 2017-05-08T20:45:11.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Appc Daemon 1.0.0 |
| Components | appcd-subprocess |
| Labels | n/a |
| Reporter | Chris Barber |
| Assignee | Chris Barber |
| Created | 2017-05-08T20:35:23.000+0000 |
| Updated | 2017-10-26T03:00:49.000+0000 |
Description
We need the ability to set up an IPC channel with a spawned process.
The way this will work starts by passing a
ipc: true in the dispatcher request payload. This will cause the spawn to force the connection use file descriptor 3 as an IPC channel.
The caller receives the subprocess descriptor: ctx.proc. It extends an event emitter, so you can listen for "message" and send using ctx.proc.send().
https://github.com/appcelerator/appc-daemon/pull/8