From 20ccb623c4dbdbc9445085ba72ca7ab90f5bffcb Mon Sep 17 00:00:00 2001 From: Emily Marigold Klassen Date: Tue, 23 Apr 2019 12:49:54 -0700 Subject: [PATCH] feat: add message event add event to listen to messages coming from the child's ipc events, partially implementing #1519 --- lib/monitor/run.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/monitor/run.js b/lib/monitor/run.js index 4c74d338..59a339da 100644 --- a/lib/monitor/run.js +++ b/lib/monitor/run.js @@ -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');