summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/worker-farm/lib/child/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/worker-farm/lib/child/index.js')
-rw-r--r--deps/npm/node_modules/worker-farm/lib/child/index.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/deps/npm/node_modules/worker-farm/lib/child/index.js b/deps/npm/node_modules/worker-farm/lib/child/index.js
index f91e08433a..78f6337139 100644
--- a/deps/npm/node_modules/worker-farm/lib/child/index.js
+++ b/deps/npm/node_modules/worker-farm/lib/child/index.js
@@ -29,7 +29,7 @@ function handle (data) {
_args[0][key] = e[key]
})
}
- process.send({ idx: idx, child: child, args: _args })
+ process.send({ owner: 'farm', idx: idx, child: child, args: _args })
}
, exec
@@ -46,7 +46,11 @@ function handle (data) {
process.on('message', function (data) {
+ if (data.owner !== 'farm') {
+ return;
+ }
+
if (!$module) return $module = require(data.module)
- if (data == 'die') return process.exit(0)
+ if (data.event == 'die') return process.exit(0)
handle(data)
})