diff --git a/test/simple/test-child-process-fork-exec-argv.js b/test/simple/test-child-process-fork-exec-argv.js index 94ea3141faa..2fbc3799690 100644 --- a/test/simple/test-child-process-fork-exec-argv.js +++ b/test/simple/test-child-process-fork-exec-argv.js @@ -25,8 +25,9 @@ var spawn = child_process.spawn; var fork = child_process.fork; if (process.argv[2] === 'fork') { - process.stdout.write(JSON.stringify(process.execArgv)); - process.exit(); + process.stdout.write(JSON.stringify(process.execArgv), function() { + process.exit(); + }); } else if (process.argv[2] === 'child') { fork(__filename, ['fork']); } else {