mirror of
https://github.com/engineer-man/piston.git
synced 2025-04-20 20:16:26 +02:00
Fix #495
This commit is contained in:
parent
9d53703a66
commit
0c0be54505
1 changed files with 4 additions and 2 deletions
|
@ -343,6 +343,9 @@ class Job {
|
|||
const [_1, state, user_friendly] = state_line.split(/\s+/);
|
||||
|
||||
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'){
|
||||
// Zombie process, just needs to be waited, regardless of the user id
|
||||
|
@ -353,8 +356,7 @@ class Job {
|
|||
}
|
||||
// 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 {
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue