Skip to content

Commit

Permalink
Suppress ESRCH errors when killing job process. Closes #1209 (#1210)
Browse files Browse the repository at this point in the history
  • Loading branch information
brollb authored Mar 9, 2019
1 parent ed4249d commit c3f4264
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/plugins/GenerateJob/templates/start.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,13 @@ requirejs([
pid = job.pid;
job = null;
log(`killing process group: ${pid}`);
process.kill(-pid, 'SIGTERM');
try {
process.kill(-pid, 'SIGTERM');
} catch (err) {
if (!err.message.includes('ESRCH')) {
log('Error while killing process group: ' + err.message);
}
}
}
if (exitCode !== undefined) {
if (exitCode !== null) {
Expand Down

0 comments on commit c3f4264

Please sign in to comment.