Skip to content

Commit

Permalink
feat: use SIGTERM/SIGINT-specific exit codes
Browse files Browse the repository at this point in the history
  • Loading branch information
hassy committed Jun 10, 2024
1 parent cf78d4a commit 8dc8f1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/artillery/lib/cmds/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,10 +337,10 @@ RunCommand.runCommandImplementation = async function (flags, argv, args) {
var finalReport = {};
var shuttingDown = false;
process.on('SIGINT', async () => {
gracefulShutdown({ earlyStop: true });
gracefulShutdown({ earlyStop: true, exitCode: 130 });
});
process.on('SIGTERM', async () => {
gracefulShutdown({ earlyStop: true });
gracefulShutdown({ earlyStop: true, exitCode: 143 });
});

async function gracefulShutdown(opts = { exitCode: 0 }) {
Expand Down

0 comments on commit 8dc8f1a

Please sign in to comment.