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) });