Skip to content

Commit

Permalink
Use signal interrupted exit codes on profile SIGINT/SIGTERM
Browse files Browse the repository at this point in the history
  • Loading branch information
tw4l committed Feb 11, 2025
1 parent b18edd3 commit a5badfe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/create-login-profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,11 @@ function getDefaultWindowSize() {

function handleTerminate(signame: string) {
logger.info(`Got signal ${signame}, exiting`);
process.exit(ExitCodes.GenericError);
let exitCode = ExitCodes.SignalInterrupted;
if (signame === "SIGTERM") {
exitCode = ExitCodes.SignalInterruptedForce;
}
process.exit(exitCode);
}

async function main() {
Expand Down

0 comments on commit a5badfe

Please sign in to comment.