aboutsummaryrefslogtreecommitdiff
path: root/lang/python27/files/patch-Python_thread__pthread.h
diff options
context:
space:
mode:
authorMaxim Sobolev <sobomax@FreeBSD.org>2009-02-27 01:25:32 +0000
committerMaxim Sobolev <sobomax@FreeBSD.org>2009-02-27 01:25:32 +0000
commitf4711ece62ae605030165a01431ea6a36f7ea096 (patch)
tree051f7c788b234a1872b2912673596e1b018c22de /lang/python27/files/patch-Python_thread__pthread.h
parent9fac048015169945a2b76a353d73c739db34d4d5 (diff)
Notes
Diffstat (limited to 'lang/python27/files/patch-Python_thread__pthread.h')
-rw-r--r--lang/python27/files/patch-Python_thread__pthread.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/lang/python27/files/patch-Python_thread__pthread.h b/lang/python27/files/patch-Python_thread__pthread.h
new file mode 100644
index 000000000000..1f4478528024
--- /dev/null
+++ b/lang/python27/files/patch-Python_thread__pthread.h
@@ -0,0 +1,30 @@
+
+$FreeBSD$
+
+--- Python/thread_pthread.h
++++ Python/thread_pthread.h
+@@ -149,6 +149,7 @@
+ {
+ pthread_t th;
+ int status;
++ sigset_t set, oset;
+ #if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
+ pthread_attr_t attrs;
+ #endif
+@@ -177,6 +178,8 @@
+ #if defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
+ pthread_attr_setscope(&attrs, PTHREAD_SCOPE_SYSTEM);
+ #endif
++ sigfillset(&set);
++ SET_THREAD_SIGMASK(SIG_BLOCK, &set, &oset);
+
+ status = pthread_create(&th,
+ #if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
+@@ -188,6 +191,7 @@
+ (void *)arg
+ );
+
++ SET_THREAD_SIGMASK(SIG_SETMASK, &oset, NULL);
+ #if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
+ pthread_attr_destroy(&attrs);
+ #endif