From ce487fe1daa7cdbc9971d6fe2c528e363fadaa5f Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 9 Sep 2013 09:53:08 +0800 Subject: [PATCH] Make sure child scripts are quit after specs are done. --- spec/fixtures/module/fork_ping.js | 3 +++ spec/fixtures/module/ping.js | 1 + 2 files changed, 4 insertions(+) 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); }); -- 2.43.0