Feature request: std::process:success #55215
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.
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 asuccess()
function akin toabort()
, that automatically feeds a host-specific error code for "success" state intoexit()
. Maybe even renameexit()
toexit_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.The text was updated successfully, but these errors were encountered: