Skip to content

Implement ExitCode::to_exit_code - #165449

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

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

Conversation

@ChrisDenton

@ChrisDenton ChrisDenton commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Tracking issue: #152049

@rustbot rustbot added A-process Area: `std::process` (note: `std::env` is A-env) S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Nov 4, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@ChrisDenton
ChrisDenton marked this pull request as ready for review November 4, 2026 17:55
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 4, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Nov 4, 2026
@rustbot

rustbot commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

r? @JohnTitor

rustbot has assigned @JohnTitor.
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 38 candidates
  • Random selection from JohnTitor, LawnGnome, Mark-Simulacrum, clarfonthey, hanna-kruppe

@maxdexh maxdexh left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You missed the ExitStatus implementations in:

  • sys/process/unix/unsupported/wait_status.rs (used by unix/unsupported, not the same as the other unsupported)
  • sys/process/unix/fuchsia.rs
  • sys/process/unix/vxworks.rs

View changes since this review


/// Converts the `ExitStatus` to an `ExitCode`.
///
/// On Unix signals are converted to [`ExitCode::FAILURE`].

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: missing comma

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 5, 2026
@maxdexh maxdexh assigned maxdexh and unassigned JohnTitor Nov 5, 2026
@maxdexh

maxdexh commented Nov 5, 2026

Copy link
Copy Markdown
Member

Did the method name get discussed? ExitStatus is a Copy type, so the to_exit_code(&self) name+signature seems a bit weird to me.

This branch has not been deployed

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

Labels

A-process Area: `std::process` (note: `std::env` is A-env) S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

5 participants