From: Cheng Zhao Date: Mon, 9 Sep 2013 01:53:08 +0000 (+0800) Subject: Make sure child scripts are quit after specs are done. X-Git-Tag: v0.4.5~5 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=ce487fe1daa7cdbc9971d6fe2c528e363fadaa5f;p=electron.git Make sure child scripts are quit after specs are done. --- diff --git a/spec/fixtures/module/fork_ping.js b/spec/fixtures/module/fork_ping.js index e6d3f921..a43f7d8d 100644 --- a/spec/fixtures/module/fork_ping.js +++ b/spec/fixtures/module/fork_ping.js @@ -9,3 +9,6 @@ process.on('message', function(msg) { child.on('message', function (msg) { process.send(msg); }); +child.on('exit', function(code) { + process.exit(code); +}); diff --git a/spec/fixtures/module/ping.js b/spec/fixtures/module/ping.js index dc380a1a..fdb9d1ec 100644 --- a/spec/fixtures/module/ping.js +++ b/spec/fixtures/module/ping.js @@ -1,3 +1,4 @@ process.on('message', function(msg) { process.send(msg); + process.exit(0); });