Skip to content

Commit 20ccb62

Browse files
forivallremy
authored andcommitted
feat: add message event
add event to listen to messages coming from the child's ipc events, partially implementing #1519
1 parent 886527f commit 20ccb62

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/monitor/run.js

+6
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,12 @@ function run(options) {
133133
bus.stdout = child.stdout;
134134
bus.stderr = child.stderr;
135135
}
136+
137+
if (shouldFork) {
138+
child.on('message', function (message, sendHandle) {
139+
bus.emit('message', message, sendHandle);
140+
});
141+
}
136142
}
137143

138144
bus.emit('start');

0 commit comments

Comments
 (0)