mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
faulthandler: don't use sigprocmask()
It has an undefined behaviour with threads, only use pthread_sigmask() if it is available (and not broken).
This commit is contained in:
parent
4571ee0b78
commit
cf2a807831
1 changed files with 1 additions and 5 deletions
|
|
@ -418,16 +418,12 @@ faulthandler_thread(void *unused)
|
|||
const char* errmsg;
|
||||
PyThreadState *current;
|
||||
int ok;
|
||||
#ifdef HAVE_PTHREAD_H
|
||||
#if defined(HAVE_PTHREAD_SIGMASK) && !defined(HAVE_BROKEN_PTHREAD_SIGMASK)
|
||||
sigset_t set;
|
||||
|
||||
/* we don't want to receive any signal */
|
||||
sigfillset(&set);
|
||||
#if defined(HAVE_PTHREAD_SIGMASK) && !defined(HAVE_BROKEN_PTHREAD_SIGMASK)
|
||||
pthread_sigmask(SIG_SETMASK, &set, NULL);
|
||||
#else
|
||||
sigprocmask(SIG_SETMASK, &set, NULL);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
do {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue