shell/task: better logs
This commit is contained in:
@@ -92,8 +92,10 @@ function spawn(tag, file, args, options) {
|
||||
});
|
||||
|
||||
signal?.addEventListener('abort', () => {
|
||||
debug(`${tag}: aborting ${cp.pid}`);
|
||||
child_process.execFile('/usr/bin/sudo', [ KILL_CHILD_CMD, cp.pid, process.pid ], { encoding: 'utf8' }, (error, stdout, stderr) => {
|
||||
if (error) debug(`${tag}: failed to kill children`, stdout, stderr);
|
||||
else debug(`${tag}: aborted ${cp.pid}`, stdout, stderr);
|
||||
});
|
||||
}, { once: true });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user