mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
gh-96652: Fix faulthandler chained signal without sigaction() (#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.
This commit is contained in:
parent
4f523a7054
commit
c580a81af9
2 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue