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

std::os::unix::process::ExitStatusExt into_raw #73128

Closed
ijackson opened this issue Jun 8, 2020 · 0 comments · Fixed by #79982
Closed

std::os::unix::process::ExitStatusExt into_raw #73128

ijackson opened this issue Jun 8, 2020 · 0 comments · Fixed by #79982
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

@ijackson
Copy link
Contributor

ijackson commented Jun 8, 2020

It it occasionally useful to be able to convert an exit status back to the raw unix value.

For example, one might want to pass it to a C library. This would also provide an escape hatch to mitigate the lack of WCOREDUMP, WIFSTOPPED/WSTOPSIG etc.

@jonas-schievink jonas-schievink added 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. labels Jun 8, 2020
JohnTitor added a commit to JohnTitor/rust that referenced this issue Jan 14, 2021
Add missing methods to unix ExitStatusExt

These are the methods corresponding to the remaining exit status examination macros from `wait.h`.  `WCOREDUMP` isn't in SuS but is it is very standard.  I have not done portability testing to see if this builds everywhere, so I may need to Do Something if it doesn't.

There is also a bugfix and doc improvement to `.signal()`, and an `.into_raw()` accessor.

This would fix rust-lang#73128 and fix rust-lang#73129.  Please let me know if you like this direction, and if so I will open the tracking issue and so on.

If this MR goes well, I may tackle rust-lang#73125 next - I have an idea for how to do it.
m-ou-se added a commit to m-ou-se/rust that referenced this issue Jan 14, 2021
Add missing methods to unix ExitStatusExt

These are the methods corresponding to the remaining exit status examination macros from `wait.h`.  `WCOREDUMP` isn't in SuS but is it is very standard.  I have not done portability testing to see if this builds everywhere, so I may need to Do Something if it doesn't.

There is also a bugfix and doc improvement to `.signal()`, and an `.into_raw()` accessor.

This would fix rust-lang#73128 and fix rust-lang#73129.  Please let me know if you like this direction, and if so I will open the tracking issue and so on.

If this MR goes well, I may tackle rust-lang#73125 next - I have an idea for how to do it.
@bors bors closed this as completed in 8ac21fb Jan 14, 2021
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

Successfully merging a pull request may close this issue.

2 participants