Repository navigation
uucore: make catching SIG{SEGV,BUS} a best effort #16703
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -50,7 +50,10 @@ pub fn main(args: TokenStream, stream: TokenStream) -> TokenStream { | |||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| // disable rust signal handlers (otherwise processes don't dump core after e.g. one SIGSEGV) | ||||||||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why is failure is a "non-serious requirement"? should be documented here
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is trivial. No?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And I don't think that |
||||||||||||||||||||||||||
| #[cfg(all(#signals, unix))] | ||||||||||||||||||||||||||
| uucore::signals::disable_rust_signal_handlers().expect("Disabling rust signal handlers failed"); | ||||||||||||||||||||||||||
| // SAFETY: Single-threaded; no other signal handlers have been installed. | ||||||||||||||||||||||||||
| let ok = unsafe { uucore::signals::disable_rust_signal_handlers() }.is_ok(); | ||||||||||||||||||||||||||
|
oech3 marked this conversation as resolved.
Resolved
|
||||||||||||||||||||||||||
| #[cfg(all(#signals, unix))] | ||||||||||||||||||||||||||
| debug_assert!(ok, "Disabling rust signal handlers failed"); | ||||||||||||||||||||||||||
|
Comment on lines
52
to
+56
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't like it (or import
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like the same number of lines to me, and it removes a duplicated cfg condition. |
||||||||||||||||||||||||||
| let result = uumain(args); | ||||||||||||||||||||||||||
| match result { | ||||||||||||||||||||||||||
| Ok(()) => uucore::error::get_exit_code(), | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.