Tracking Issue for ExitCodeExt on Windows #111688
Labels
C-tracking-issue
Category: An issue tracking the progress of sth. like the implementation of an RFC
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
Feature gate:
#![feature(windows_process_exit_code_from)]
This is a tracking issue for implementing additional
ExitCode
s for Windows.Motivation
On Windows it is common for applications to return
HRESULT
(i32
) orDWORD
(u32
) values. These stem from COM based components (HRESULTS), Win32 errors (GetLastError), GUI applications (WM_QUIT) and more. The newly stabilizedExitCode
provides an excellent fit for propagating these values, becausestd::process::exit
does not run deconstructors which can result in errors. However,ExitCode
currently only implementsFrom<u8> for ExitCode
, which disallows the full range ofi32
/u32
values. This pull requests attempts to address that shortcoming by providing windows specific extensions that accept au32
value (which covers all possibleHRESULTS
and Win32 errors) analog to ExitStatusExt::from_raw.This was also intended by the original Stabilization #93840 (comment) as pointed out by @eggyal in #97914 (comment):
[Emphasis added]
Public API
Steps / History
Unresolved Questions
Additional Links
Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩
The text was updated successfully, but these errors were encountered: