Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
gh-101100: Fix Sphinx warnings inlibrary/faulthandler.rst
#118353
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
PR title is interesting 👀 |
hugovk commentedApr 27, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Haha, it was a mistake, corrected now! I had some extra stuff on |
library/faulthandler.rst
:c:func:`!_exit` with status=1 after dumping the tracebacks. (Note | ||
:c:func:`!_exit` exits the process immediately, which means it doesn't do any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Is this the same ashttps://docs.python.org/3/library/os.html#os._exit? Should this link to that, maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I don't think so, it's calling the C one fromunistd.h
:
cpython/Modules/faulthandler.c
Line 11 ine0ab642
# include<unistd.h>// _exit() |
cpython/Modules/faulthandler.c
Lines 591 to 592 ine0ab642
if (thread.exit) | |
_exit(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I thinkos._exit
is just a very thin wrapper around the C one:
Lines 6613 to 6619 ine0ab642
staticPyObject* | |
os__exit_impl(PyObject*module,intstatus) | |
/*[clinic end generated code: output=116e52d9c2260d54 input=5e6d57556b0c4a62]*/ | |
{ | |
_exit(status); | |
returnNULL;/* Make gcc -Wall happy */ | |
} |
But yes, good point, they're not exactly the same!
33c6cf3
intopython:mainUh oh!
There was an error while loading.Please reload this page.
Thanks@hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
…ythonGH-118353)(cherry picked from commit33c6cf3)Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
GH-118366 is a backport of this pull request to the3.12 branch. |
Uh oh!
There was an error while loading.Please reload this page.
Fix 13 warnings:
Link the
SIG*
py:const
s to thesignal
module, and add!
to thec:func
s which I don't think need documenting.📚 Documentation preview 📚:https://cpython-previews--118353.org.readthedocs.build/