Skip to content
Snippets Groups Projects
Unverified Commit 3d6e6beb authored by Miss Islington (bot)'s avatar Miss Islington (bot) Committed by GitHub
Browse files

gh-96652: Fix faulthandler chained signal without sigaction() (GH-96666)



Fix the faulthandler implementation of faulthandler.register(signal,
chain=True) if the sigaction() function is not available: don't call
the previous signal handler if it's NULL.
(cherry picked from commit c580a81a)

Co-authored-by: default avatarVictor Stinner <vstinner@python.org>
parent a3d5ecba
No related branches found
No related tags found
No related merge requests found
Fix the faulthandler implementation of ``faulthandler.register(signal,
chain=True)`` if the ``sigaction()`` function is not available: don't call
the previous signal handler if it's NULL. Patch by Victor Stinner.
...@@ -862,7 +862,7 @@ faulthandler_user(int signum) ...@@ -862,7 +862,7 @@ faulthandler_user(int signum)
errno = save_errno; errno = save_errno;
} }
#else #else
if (user->chain) { if (user->chain && user->previous != NULL) {
errno = save_errno; errno = save_errno;
/* call the previous signal handler */ /* call the previous signal handler */
user->previous(signum); user->previous(signum);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment