Skip to content

Commit

Permalink
Update job.js
Browse files Browse the repository at this point in the history
Added win32 vs posix options.
  • Loading branch information
dropthemic authored Jun 11, 2018
1 parent d4d16be commit af1f64c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/job.js
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,8 @@ module.exports = Class.create({
try {
//Do not pass child_opts to spawn in windows, you will get
//error: "Operation not supported on socket (spawn ENOTSUP)"
child = cp.spawn( "node.exe", [child_cmd.concat(child_args)], {stdio: child_opts.stdio} );
child = process.platform === "win32" ? cp.spawn( "node.exe", [child_cmd.concat(child_args)], {stdio: child_opts.stdio} )
: cp.spawn( child_cmd, child_args, child_opts );
}
catch (err) {
if (worker.log_fd) { fs.closeSync(worker.log_fd); worker.log_fd = null; }
Expand Down

0 comments on commit af1f64c

Please sign in to comment.