shell: rename signal to abortSignal
this prevents accidental typos with child_process signal handling
This commit is contained in:
@@ -179,9 +179,13 @@ async function startTask(id, options) {
|
||||
}, options.timeout);
|
||||
}
|
||||
|
||||
const sudoOptions = { preserveEnv: true, signal: ac.signal };
|
||||
const sudoArgs = [ START_TASK_CMD, id, logFile, options.nice || 0, options.memoryLimit || 400, options.oomScoreAdjust || 0 ];
|
||||
const sudoOptions = {
|
||||
preserveEnv: true,
|
||||
abortSignal: ac.signal,
|
||||
};
|
||||
|
||||
const [sudoError] = await safe(shell.sudo([ START_TASK_CMD, id, logFile, options.nice || 0, options.memoryLimit || 400, options.oomScoreAdjust || 0 ], sudoOptions));
|
||||
const [sudoError] = await safe(shell.sudo(sudoArgs, sudoOptions));
|
||||
const code = sudoError ? sudoError.code : 0;
|
||||
|
||||
debug(`startTask: ${id} completed with code ${code} ${!gTasks[id] ? '. this will be ignored' : ''}`);
|
||||
|
||||
Reference in New Issue
Block a user