Skip to content

Stabilize ExitCode::exit_process - #161908

Open
ChrisDenton wants to merge 1 commit into
rust-lang:mainfrom
ChrisDenton:exit_proccess
Open

Stabilize ExitCode::exit_process#161908
ChrisDenton wants to merge 1 commit into
rust-lang:mainfrom
ChrisDenton:exit_proccess

Conversation

@ChrisDenton

@ChrisDenton ChrisDenton commented Aug 28, 2026

Copy link
Copy Markdown
Member

Tracking issue: #97100

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Aug 28, 2026
@rustbot

rustbot commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ChrisDenton, libs
  • @ChrisDenton, libs expanded to 13 candidates
  • Random selection from JohnTitor, Mark-Simulacrum, clarfonthey, nia-e

@RalfJung RalfJung added the I-libs-nominated Nominated for discussion during a libs team meeting. label Aug 28, 2026
@clarfonthey

Copy link
Copy Markdown
Contributor

(we decided we don't need to nominate if we just start FCP)

@ChrisDenton

ChrisDenton commented Aug 28, 2026

Copy link
Copy Markdown
Member Author

I'll start one here too. The first confused libs-fcp member can cancel the other one.

@rust-rfcbot

rust-rfcbot commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

@ChrisDenton has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rust-rfcbot rust-rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Aug 28, 2026
@clarfonthey clarfonthey removed the I-libs-nominated Nominated for discussion during a libs team meeting. label Aug 28, 2026
@ChrisDenton

Copy link
Copy Markdown
Member Author

For reference I'll copy across my comment from the tracking issue:

I guess my only concern nowadays would be that I'm increasingly wanting people not to use exit_process if they can at all avoid it. Properly exiting from main avoids potential surprises (e.g. drops not being run, TLS fun, unsound atexit, etc).

That said, we do have exit_process already and it does have some use cases so being able to use an ExitCode is better than not being able to.

@clarfonthey

Copy link
Copy Markdown
Contributor

Yeah, it makes sense to potentially discourage this method + the regular exit via a clippy lint or something, while still allowing it as an option. In particular, this has an advantage over the regular exit since it can forward signals etc. correctly.

@Sharadkumar2124

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants