use a compatible waitpid library
This commit is contained in:
parent
dd31873700
commit
347f2d56d7
File diff suppressed because it is too large
Load Diff
|
@ -14,6 +14,7 @@
|
||||||
"ps-list": "^7.2.0",
|
"ps-list": "^7.2.0",
|
||||||
"semver": "^7.3.4",
|
"semver": "^7.3.4",
|
||||||
"uuid": "^8.3.2",
|
"uuid": "^8.3.2",
|
||||||
|
"waitpid2": "^2.0.5",
|
||||||
"yargs": "^16.2.0"
|
"yargs": "^16.2.0"
|
||||||
},
|
},
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
|
|
|
@ -6,7 +6,7 @@ const config = require('./config');
|
||||||
const globals = require('./globals');
|
const globals = require('./globals');
|
||||||
const fs = require('fs/promises');
|
const fs = require('fs/promises');
|
||||||
const ps_list = require('ps-list');
|
const ps_list = require('ps-list');
|
||||||
const wait_pid = require('waitpid');
|
const wait_pid = require('waitpid2');
|
||||||
|
|
||||||
const job_states = {
|
const job_states = {
|
||||||
READY: Symbol('Ready to be primed'),
|
READY: Symbol('Ready to be primed'),
|
||||||
|
@ -193,7 +193,7 @@ class Job {
|
||||||
processes.map(
|
processes.map(
|
||||||
async proc => {
|
async proc => {
|
||||||
process.kill(proc.pid, 'SIGKILL');
|
process.kill(proc.pid, 'SIGKILL');
|
||||||
wait_pid(proc.pid); //Free zombie state process
|
wait_pid(proc.pid, wait_pid.WNOHANG); //Free zombie state process
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue