From ad56f8d5ded59e75114d8c5ac5bcf34838ff84fe Mon Sep 17 00:00:00 2001 From: "e.baranov" Date: Tue, 20 Dec 2016 17:38:37 +0300 Subject: [PATCH] Exit with non-zero code if phantomjs was killed --- bin/phantomjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/phantomjs b/bin/phantomjs index 637cba7f1..5113d307d 100755 --- a/bin/phantomjs +++ b/bin/phantomjs @@ -29,10 +29,10 @@ cp.on('error', function (err) { console.error(err.stack) }) -cp.on('exit', function(code){ +cp.on('exit', function(code, signal){ // Wait few ms for error to be printed. setTimeout(function(){ - process.exit(code) + process.exit(signal ? 1 : code) }, 20) });