catch SIGINT so we can Ctrl+C to close camera.js on the terminal

merge-requests/63/head
影月 零 2018-07-05 18:34:01 +09:00
parent 5eaf62edd1
commit 0372337e09
1 changed files with 4 additions and 1 deletions

View File

@ -13,6 +13,9 @@ process.on('uncaughtException', function (err) {
console.error('Uncaught Exception occured!');
console.error(err.stack);
});
process.on('SIGINT', function() {
process.exit();
});
var staticFFmpeg = false;
try{
staticFFmpeg = require('ffmpeg-static').path;
@ -6751,4 +6754,4 @@ if(config.childNodes.mode === 'child'){
}
})
},1500)
}
}