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

Feature request: std::process:success #55215

Closed
mcandre opened this issue Oct 20, 2018 · 3 comments
Closed

Feature request: std::process:success #55215

mcandre opened this issue Oct 20, 2018 · 3 comments
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@mcandre
Copy link

mcandre commented Oct 20, 2018

Do not assume that all hosts use zero exit code to indicate success. This convention applies to most operating systems but not all. I'm trying to track down the Reddit thread (?) where I learned this historical tidbit, but I can't find it at the moment.

It would be good for the std::process API to provide a success() function akin to abort(), that automatically feeds a host-specific error code for "success" state into exit(). Maybe even rename exit() to exit_custom() and deprecate with a warning about different operating system conventions around exit codes? This can help Rust code become more cross-platform by default.

@scottmcm
Copy link
Member

You might be interested in ExitCode::SUCCESS, though that whole struct is in need of someone to put some design work in (#48711 (comment)) and make an official proposal of where to go with it.

@jonas-schievink jonas-schievink added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. C-feature-request Category: A feature request, i.e: not implemented / a PR. labels Jan 27, 2019
@jonas-schievink
Copy link
Contributor

Should this be closed in favor of #48711?

@Mark-Simulacrum
Copy link
Member

Yes, closing in favor of #48711.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants