summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/worker-farm/lib/fork.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/worker-farm/lib/fork.js')
-rw-r--r--deps/npm/node_modules/worker-farm/lib/fork.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/deps/npm/node_modules/worker-farm/lib/fork.js b/deps/npm/node_modules/worker-farm/lib/fork.js
index cbd4011c73..46cf79b73e 100644
--- a/deps/npm/node_modules/worker-farm/lib/fork.js
+++ b/deps/npm/node_modules/worker-farm/lib/fork.js
@@ -15,17 +15,15 @@ function fork (forkModule) {
, cwd: process.cwd()
})
+ child.on('error', function() {
+ // this *should* be picked up by onExit and the operation requeued
+ })
+
child.send({ module: forkModule })
// return a send() function for this child
return {
- send : function (data) {
- try {
- child.send(data)
- } catch (e) {
- // this *should* be picked up by onExit and the operation requeued
- }
- }
+ send : child.send.bind(child)
, child : child
}
}