From e0eb20f29bdee2bbb9ef93199a962de3ee900f29 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Wed, 1 Mar 2017 04:28:37 +0300 Subject: [PATCH] notes... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/peer.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ui (gen4)/features/peer.js b/ui (gen4)/features/peer.js index 3c3d9838..d1fc8034 100755 --- a/ui (gen4)/features/peer.js +++ b/ui (gen4)/features/peer.js @@ -377,13 +377,16 @@ module.ChildProcessPeer = core.ImageGridFeatures.Feature({ handlers: [ // XXX check if we are a child and setup communications with the // parent... + // ...checking if child is simple: + // process.send != null -> child ['start', function(){ var that = this // XXX do we need to handle stdout/stderr here??? - // XXX need to handle both the child and parent processes... + // ...make this reusable... + process.on('message', function(msg){ // Handle action call... // @@ -405,8 +408,6 @@ module.ChildProcessPeer = core.ImageGridFeatures.Feature({ // do the call... var res = that[msg.action].apply(that, msg.args || []) - // XXX check if res is a promise/promise-like... - // return the value... if(!msg.ignore_return){ res.then ?