Kaydet (Commit) 3cc635da authored tarafından Victor Stinner's avatar Victor Stinner

faulthandler: fix the handler of user signals

Restore the errno before calling the previous signal handler, and not after.
üst 652e758f
......@@ -659,17 +659,22 @@ faulthandler_user(int signum)
#ifdef HAVE_SIGACTION
if (user->chain) {
(void)sigaction(signum, &user->previous, NULL);
errno = save_errno;
/* call the previous signal handler */
raise(signum);
save_errno = errno;
(void)faulthandler_register(signum, user->chain, NULL);
errno = save_errno;
}
#else
if (user->chain) {
errno = save_errno;
/* call the previous signal handler */
user->previous(signum);
}
#endif
errno = save_errno;
}
static int
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment