Skip to content

aborts: Clarify documentation and comments#85377

Merged
bors merged 7 commits intorust-lang:masterfrom
ijackson:abort-docs
Jul 5, 2021
Merged

aborts: Clarify documentation and comments#85377
bors merged 7 commits intorust-lang:masterfrom
ijackson:abort-docs

Conversation

@ijackson
Copy link
Copy Markdown
Contributor

@ijackson ijackson commented May 16, 2021

In the docs for intrinsics::abort():

  • Strengthen the recommendation by to use process::abort instead.
  • Document the fact that it sometimes (ab)uses an LLVM debug trap and what the likely consequences are.
  • State that the precise behaviour is unstable.

In the docs for process::abort():

  • Promise that we have the same behaviour as C abort().
  • Document the likely consequences, including, specifically, the consequences on Unix.

In the internal comment for unix::abort_internal:

  • Refer to the public docs for the public API functions.
  • Correct and expand the description of libc::abort. Specifically:
  • Do not claim that abort() unregisters signal handlers. It doesn't; it honours the SIGABRT handler.
  • Discuss, extensively, the issue with abort() flushing stdio buffers.
  • Describe the glibc behaviour in some detail.

Co-authored-by: Mark Wooding mdw@distorted.org.uk
Signed-off-by: Ian Jackson ijackson@chiark.greenend.org.uk

Fixes #40230

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document differences between std::process::abort and std::intrinsics::abort