edge case

This commit is contained in:
Thomas Hobson 2021-04-26 13:37:50 +12:00
parent 3673b4e403
commit 6fe0da030d
No known key found for this signature in database
GPG Key ID: 9F1FD9D87950DB6F
1 changed files with 5 additions and 1 deletions

View File

@ -192,7 +192,11 @@ class Job {
processes = processes.filter(proc => proc.uid == this.uid); processes = processes.filter(proc => proc.uid == this.uid);
for(const proc of processes){ for(const proc of processes){
try{
process.kill(proc.pid, 'SIGKILL'); process.kill(proc.pid, 'SIGKILL');
}catch{
// Could already be dead and just needs to be waited on
}
wait_pid(proc.pid); wait_pid(proc.pid);
} }
} }