Skip to content

Commit

Permalink
feat: add message event
Browse files Browse the repository at this point in the history
add event to listen to messages coming from the child's ipc events, partially implementing #1519
  • Loading branch information
forivall authored and remy committed May 1, 2019
1 parent 886527f commit 20ccb62
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/monitor/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,12 @@ function run(options) {
bus.stdout = child.stdout;
bus.stderr = child.stderr;
}

if (shouldFork) {
child.on('message', function (message, sendHandle) {
bus.emit('message', message, sendHandle);
});
}
}

bus.emit('start');
Expand Down

0 comments on commit 20ccb62

Please sign in to comment.