add force kill on pid for zombie cameraThread processes

pushover
Moe 2020-01-03 23:27:16 -08:00
parent c27f46f289
commit 2bb2f83af5
1 changed files with 10 additions and 0 deletions

View File

@ -160,7 +160,17 @@ module.exports = function(s,config,lang){
sendTempImage()
})
var snapProcessTimeout = setTimeout(function(){
var pid = snapProcess.pid
snapProcess.kill('SIGTERM')
setTimeout(function(){
if(s.isWin === false){
exec('kill -9 ' + pid,function(){
})
}else{
snapProcess.kill()
}
},10000)
},30000)
}catch(err){
console.log(err)