Compare commits
No commits in common. "81e315609dd2631da8cc1cbbc15fd7e01076cb21" and "37e83c981356a6fc7ac82224a20e93b01ed85264" have entirely different histories.
81e315609d
...
37e83c9813
|
@ -121,17 +121,12 @@ class Job {
|
|||
'--fsize=' + this.runtime.max_file_size,
|
||||
];
|
||||
|
||||
const timeout_call = [
|
||||
'timeout', '-s', '9', Math.ceil(timeout / 1000),
|
||||
];
|
||||
|
||||
if (memory_limit >= 0) {
|
||||
prlimit.push('--as=' + memory_limit);
|
||||
}
|
||||
|
||||
const proc_call = [
|
||||
'nice',
|
||||
...timeout_call,
|
||||
...prlimit,
|
||||
...nonetwork,
|
||||
'bash',
|
||||
|
@ -342,19 +337,13 @@ class Job {
|
|||
|
||||
const [_1, state, user_friendly] = state_line.split(/\s+/);
|
||||
|
||||
const proc_id_int = parse_int(proc_id);
|
||||
|
||||
if (state == 'Z'){
|
||||
// Zombie process, just needs to be waited, regardless of the user id
|
||||
if(!to_wait.includes(proc_id_int))
|
||||
to_wait.push(proc_id_int);
|
||||
|
||||
if (state == 'Z')
|
||||
// Zombie process, just needs to be waited
|
||||
return -1;
|
||||
}
|
||||
// We should kill in all other state (Sleep, Stopped & Running)
|
||||
|
||||
if (ruid == this.uid || euid == this.uid)
|
||||
return proc_id_int;
|
||||
return parse_int(proc_id);
|
||||
} catch {
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue