mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-20 04:02:27 +00:00
Make sure the singal is delivered to the main thread, where python
runs its signal handlers, not to a random thread that happens to be executing at the time when signal arrives. This functionality has been lost since Python 2.3, possible cause is that the linux implementation of POSIX threads always delivered signal to the main thread. This bug results in rather annoying inability to terminate threading script with ^C for example and there could be other issues as well. Bump PORTREVISION. PR: ports/131080 Submitted by: Andriy Pylypenko <bamby@sippysoft.com> Approved by: MAINTAINER's timeout
This commit is contained in:
parent
9fac048015
commit
f4711ece62
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=229118
@ -7,7 +7,7 @@
|
||||
|
||||
PORTNAME= python24
|
||||
PORTVERSION= 2.4.5
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
CATEGORIES= lang python ipv6
|
||||
MASTER_SITES= ${PYTHON_MASTER_SITES}
|
||||
MASTER_SITE_SUBDIR= ${PYTHON_MASTER_SITE_SUBDIR}
|
||||
|
30
lang/python24/files/patch-Python_thread__pthread.h
Normal file
30
lang/python24/files/patch-Python_thread__pthread.h
Normal file
@ -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
|
@ -6,6 +6,7 @@
|
||||
|
||||
PORTNAME= python25
|
||||
PORTVERSION= 2.5.4
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= lang python ipv6
|
||||
MASTER_SITES= ${PYTHON_MASTER_SITES}
|
||||
MASTER_SITE_SUBDIR= ${PYTHON_MASTER_SITE_SUBDIR}
|
||||
|
30
lang/python25/files/patch-Python_thread__pthread.h
Normal file
30
lang/python25/files/patch-Python_thread__pthread.h
Normal file
@ -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
|
@ -6,7 +6,7 @@
|
||||
|
||||
PORTNAME= python26
|
||||
PORTVERSION= 2.6.1
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= lang python ipv6
|
||||
MASTER_SITES= ${PYTHON_MASTER_SITES}
|
||||
MASTER_SITE_SUBDIR= ${PYTHON_MASTER_SITE_SUBDIR}
|
||||
|
30
lang/python26/files/patch-Python_thread__pthread.h
Normal file
30
lang/python26/files/patch-Python_thread__pthread.h
Normal file
@ -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
|
@ -6,7 +6,7 @@
|
||||
|
||||
PORTNAME= python26
|
||||
PORTVERSION= 2.6.1
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= lang python ipv6
|
||||
MASTER_SITES= ${PYTHON_MASTER_SITES}
|
||||
MASTER_SITE_SUBDIR= ${PYTHON_MASTER_SITE_SUBDIR}
|
||||
|
30
lang/python27/files/patch-Python_thread__pthread.h
Normal file
30
lang/python27/files/patch-Python_thread__pthread.h
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user