Repository navigation
fix(cli): Exit 124 when local run --timeout stops the app - #2434
Merged
Merged
Conversation
When `--timeout` stopped the app, `local run` exited with whatever the app returned on SIGTERM: 143 with an error for most apps, 137 after a SIGKILL escalation, and 0 for apps such as `next dev`, so a timeout looked like success. Exit 124 whenever the timeout stops the app, as GNU `timeout` does, and print one line instead of an error. An app that exits first keeps its code, and `--verify` timeouts still exit 64. Co-Authored-By: Aditya Mathur <57684218+MathurAditya724@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
If the user already stopped the app and it is still shutting down when the --timeout timer fires, let it finish and keep its exit code instead of exiting 124. Print "Stopping after Ns (--timeout)…" when the timer fires, so an app that ignores SIGTERM isn't silent until the SIGKILL. List 124 and 252 as shell conventions in the exit code ranges. Co-Authored-By: Aditya Mathur <57684218+MathurAditya724@users.noreply.github.com>
MathurAditya724
approved these changes
Nov 19, 2026
MathurAditya724
left a comment
Member
There was a problem hiding this comment.
Reviewed the updated head with main after #2433. Typecheck, lint and the full workspace suite pass. Independent real CLI checks confirm exit 124 for normal SIGTERM, clean SIGTERM handlers and SIGKILL escalation; an app exiting naturally keeps exit 7; verify timeout stays 64; Ctrl-C before timeout keeps a clean exit even when shutdown crosses the deadline. Child processes are reaped. The updated test passes the ready-file path as an argument. No actionable findings.
This was referenced Nov 19, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When
--timeoutstopped the app,sentry local runexited with whatever the app returned on SIGTERM. Most apps gave 143 plus an error, a SIGKILL escalation gave 137, and apps that exit cleanly on SIGTERM, likenext dev, gave 0, so a timeout looked like a success.Now a timeout always exits 124, like GNU
timeout, and prints a short note instead of an error. An app that exits on its own before the timeout keeps its exit code, and so does one you already stopped with Ctrl-C.--verifytimeouts still exit 64. The help, thelocaldocs and the exit code reference cover 124.Before:
After:
via @MathurAditya724.
--
View Session [Sentry]