Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Spawned workers should use the same working directory as the master. #172

Open
wants to merge 1 commit into from

2 participants

@alexkwolfe

Before this fix, the process.cwd() of workers was the parent directory of the running script rather than the current working directory of the master script process. This fix ensures that the workers have the same process.cwd() as the master.

@kainosnoema

+1

I just ran into this again tonight. Seems like a major change, but makes a lot of sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/worker.js
View
2  lib/worker.js
@@ -205,7 +205,7 @@ Worker.prototype.spawn = function(id){
this.proc = spawn(
node
, this.master.cmd
- , { customFds: customFds, env: env });
+ , { customFds: customFds, env: env, cwd: process.cwd() });
// unix domain socket for ICP + fd passing
this.sock = new net.Socket(fds[1], 'unix');
Something went wrong with that request. Please try again.