Skip to content

Instantly share code, notes, and snippets.

@isaacs
Created March 8, 2013 16:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isaacs/5117638 to your computer and use it in GitHub Desktop.
Save isaacs/5117638 to your computer and use it in GitHub Desktop.
diff --git a/test/simple/test-child-process-fork-exec-path.js b/test/simple/test
index 36ce11f..be5aa45 100755
--- a/test/simple/test-child-process-fork-exec-path.js
+++ b/test/simple/test-child-process-fork-exec-path.js
@@ -26,7 +26,9 @@ var path = require('path');
var common = require('../common');
var msg = {test: 'this'};
var nodePath = process.execPath;
-var symlinkPath = path.join(common.tmpDir, 'node-symlink');
+
+// Windows doesn't like spawning anything without a .exe on it.
+var symlinkPath = path.join(common.tmpDir, 'node-symlink.exe');
if (process.env.FORK) {
assert(process.send);
@@ -41,12 +43,14 @@ else {
catch (e) {
if (e.code !== 'ENOENT') throw e;
}
+ console.log('symlinkPath %s', symlinkPath);
fs.symlinkSync(nodePath, symlinkPath);
var child = require('child_process').fork(__filename, {
execPath: symlinkPath,
env: { FORK: 'true' }
});
+
child.on('message', common.mustCall(function(recv) {
assert.deepEqual(msg, recv);
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment