fix(core): now killing groups of processes with negative pid
This commit is contained in:
		| @@ -24,14 +24,15 @@ export class SmartExit { | |||||||
|       console.log('found remaining child processes'); |       console.log('found remaining child processes'); | ||||||
|       let counter = 1; |       let counter = 1; | ||||||
|       this.processesToEnd.forEach(async childProcessArg => { |       this.processesToEnd.forEach(async childProcessArg => { | ||||||
|         console.log(`killing process #${counter}`); |         const pid = childProcessArg.pid; | ||||||
|  |         console.log(`killing process #${counter} with pid ${pid}`); | ||||||
|         plugins.smartdelay.delayFor(10000).then(() => { |         plugins.smartdelay.delayFor(10000).then(() => { | ||||||
|           if (childProcessArg.killed) { |           if (childProcessArg.killed) { | ||||||
|             return; |             return; | ||||||
|           } |           } | ||||||
|           childProcessArg.kill('SIGKILL'); |           process.kill(-pid, 'SIGKILL'); | ||||||
|         }) |         }); | ||||||
|         childProcessArg.kill('SIGINT'); |         process.kill(-pid, 'SIGINT'); | ||||||
|          |          | ||||||
|         counter++; |         counter++; | ||||||
|       }); |       }); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user