This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

child_process.fork: allow execPath to be specified.

  • Loading branch information...
1 parent 5979f09 commit ab8f2ccbd551757b81558750c22edc107005eb03 @lwille lwille committed May 10, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/child_process.js
View
@@ -203,7 +203,10 @@ exports.fork = function(modulePath /*, args, options*/) {
// stdin is the IPC channel.
options.stdinStream = createPipe(true);
- var child = spawn(process.execPath, args, options);
+ // default to process.execPath if options.execPath is not provided
+ options.execPath = options.execPath || process.execPath;
+
+ var child = spawn(options.execPath, args, options);
setupChannel(child, options.stdinStream);

0 comments on commit ab8f2cc

Please sign in to comment.