This commit is contained in:
Thomas Hobson 2022-07-02 01:46:44 +12:00 committed by GitHub
parent 9d53703a66
commit 0c0be54505
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -344,6 +344,9 @@ class Job {
const proc_id_int = parse_int(proc_id); const proc_id_int = parse_int(proc_id);
// Skip over any processes that aren't ours.
if(ruid != this.uid && euid != this.uid) return -1;
if (state == 'Z'){ if (state == 'Z'){
// Zombie process, just needs to be waited, regardless of the user id // Zombie process, just needs to be waited, regardless of the user id
if(!to_wait.includes(proc_id_int)) if(!to_wait.includes(proc_id_int))
@ -353,7 +356,6 @@ class Job {
} }
// We should kill in all other state (Sleep, Stopped & Running) // We should kill in all other state (Sleep, Stopped & Running)
if (ruid == this.uid || euid == this.uid)
return proc_id_int; return proc_id_int;
} catch { } catch {
return -1; return -1;