Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2017-03-01 04:28:37 +03:00
parent 544604a2bc
commit e0eb20f29b

View File

@ -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 ?