[Python-checkins] cpython: faulthandler: don't use sigprocmask()
victor.stinner
python-checkins at python.org
Tue Apr 19 23:36:22 CEST 2011
http://hg.python.org/cpython/rev/73ccc552fef3
changeset: 69456:73ccc552fef3
user: Victor Stinner <victor.stinner at haypocalc.com>
date: Tue Apr 19 23:30:57 2011 +0200
summary:
faulthandler: don't use sigprocmask()
It has an undefined behaviour with threads, only use pthread_sigmask() if
it is available (and not broken).
files:
Modules/faulthandler.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c
--- a/Modules/faulthandler.c
+++ b/Modules/faulthandler.c
@@ -418,16 +418,12 @@
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 {
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list