Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProcessExit should have method .code() -> int #17618

Closed
lilyball opened this issue Sep 29, 2014 · 1 comment
Closed

ProcessExit should have method .code() -> int #17618

lilyball opened this issue Sep 29, 2014 · 1 comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@lilyball
Copy link
Contributor

When a process exits due to a signal, and that process was launched by a shell, the shell typically treats the exit status of the process to be 128 + the signal number. This is true for bash, fish, and zsh (I haven't tested other shells). Based on this, it would be convenient for ProcessExit to have a method

fn code(&self) -> int;

that replicates this behavior, in order to make it easier for programs that don't want to have to care about the distinction between a signal and a normal exit.

@kmcallister kmcallister added A-libs C-enhancement Category: An issue proposing an enhancement or a PR with one. labels Sep 29, 2014
@steveklabnik
Copy link
Member

I'm pulling a massive triage effort to get us ready for 1.0. As part of this, I'm moving stuff that's wishlist-like to the RFCs repo, as that's where major new things should get discussed/prioritized.

This issue has been moved to the RFCs repo: rust-lang/rfcs#787

lnicola pushed a commit to lnicola/rust that referenced this issue Jul 28, 2024
…atch, r=Veykril

Support rustc_skip_during_method_dispatch

Fixes rust-lang/rust-analyzer#17256
RalfJung pushed a commit to RalfJung/rust that referenced this issue Aug 1, 2024
…atch, r=Veykril

Support rustc_skip_during_method_dispatch

Fixes rust-lang/rust-analyzer#17256
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

No branches or pull requests

3 participants