diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-09-08 10:47:07 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-08 10:47:07 (GMT) |
commit | 3d6e6beb0d85f064a19e60012d140b5bc4ea0cca (patch) | |
tree | c8a0ff036b1bb1c14cf381719be34f299b2ac90f /Modules | |
parent | a3d5ecba1c6a5533b4c25d86d5861245010b9a65 (diff) | |
download | cpython-3d6e6beb0d85f064a19e60012d140b5bc4ea0cca.zip cpython-3d6e6beb0d85f064a19e60012d140b5bc4ea0cca.tar.gz cpython-3d6e6beb0d85f064a19e60012d140b5bc4ea0cca.tar.bz2 |
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 c580a81af91af4b9df85e466f8b48c3c9c86c3df)
Co-authored-by: Victor Stinner <vstinner@python.org>
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/faulthandler.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c index 3026bb6..4847c1c 100644 --- a/Modules/faulthandler.c +++ b/Modules/faulthandler.c @@ -862,7 +862,7 @@ faulthandler_user(int signum) errno = save_errno; } #else - if (user->chain) { + if (user->chain && user->previous != NULL) { errno = save_errno; /* call the previous signal handler */ user->previous(signum); |