mirror of
https://github.com/engineer-man/piston.git
synced 2025-05-06 03:46:27 +02:00
remove useless kill
This commit is contained in:
parent
349beeb45a
commit
3b0f2a0013
1 changed files with 1 additions and 7 deletions
|
@ -100,6 +100,7 @@ class Job {
|
||||||
|
|
||||||
proc.stdin.write(this.stdin);
|
proc.stdin.write(this.stdin);
|
||||||
proc.stdin.end();
|
proc.stdin.end();
|
||||||
|
proc.stdin.destroy();
|
||||||
|
|
||||||
const kill_timeout = set_timeout(_ => proc.kill('SIGKILL'), timeout);
|
const kill_timeout = set_timeout(_ => proc.kill('SIGKILL'), timeout);
|
||||||
|
|
||||||
|
@ -126,13 +127,6 @@ class Job {
|
||||||
|
|
||||||
proc.stderr.destroy();
|
proc.stderr.destroy();
|
||||||
proc.stdout.destroy();
|
proc.stdout.destroy();
|
||||||
|
|
||||||
try {
|
|
||||||
process.kill(-proc.pid, 'SIGKILL');
|
|
||||||
} catch(e) {
|
|
||||||
logger.warn(e)
|
|
||||||
// Process will be dead already, so nothing to kill.
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
proc.on('exit', (code, signal)=>{
|
proc.on('exit', (code, signal)=>{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue