summaryrefslogtreecommitdiff
path: root/lang/python23-pth
diff options
context:
space:
mode:
authorlukem <lukem@pkgsrc.org>2004-06-14 02:31:13 +0000
committerlukem <lukem@pkgsrc.org>2004-06-14 02:31:13 +0000
commit16f02bb61328d69d59dd3a77e2cd29bbeb7942ca (patch)
tree8bd7547da349a982bef2f61b02eead48a2faca47 /lang/python23-pth
parentdd030e3fb5d3207f42c2cbc92b0b6ebefcccf2f5 (diff)
downloadpkgsrc-16f02bb61328d69d59dd3a77e2cd29bbeb7942ca.tar.gz
* Add patches to ensure that signal handlers consistently don't set SA_RESTART
(restartable system calls). (These patches have been submitted back to the python community.). Fixes the bug in NetBSD PR [pkg/24797] that I submitted. * Highlight in the DESCR files what the thread support is for that package. * Bump PKGREVISION.
Diffstat (limited to 'lang/python23-pth')
-rw-r--r--lang/python23-pth/DESCR2
-rw-r--r--lang/python23-pth/distinfo4
-rw-r--r--lang/python23-pth/patches/patch-ca54
-rw-r--r--lang/python23-pth/patches/patch-cb24
4 files changed, 83 insertions, 1 deletions
diff --git a/lang/python23-pth/DESCR b/lang/python23-pth/DESCR
index 25130675866..3a712368832 100644
--- a/lang/python23-pth/DESCR
+++ b/lang/python23-pth/DESCR
@@ -12,3 +12,5 @@ written in C or C++. On most systems such modules may be
dynamically loaded. Python is also adaptable as an exten-
sion language for existing applications. See the internal
documentation for hints.
+
+This package has been compiled with support for threads.
diff --git a/lang/python23-pth/distinfo b/lang/python23-pth/distinfo
index cd22dc7efe7..138494157d8 100644
--- a/lang/python23-pth/distinfo
+++ b/lang/python23-pth/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.17 2004/06/10 10:13:06 recht Exp $
+$NetBSD: distinfo,v 1.18 2004/06/14 02:31:13 lukem Exp $
SHA1 (Python-2.3.4.tgz) = 7d47431febec704e766b57f12a1a5030bb2d03c3
Size (Python-2.3.4.tgz) = 8502738 bytes
@@ -12,3 +12,5 @@ SHA1 (patch-al) = 903b42991a83fe5f5f4f3a20f88abb4937174f26
SHA1 (patch-am) = eda4c6161b4237e1281cc6b82b26c5195444dcff
SHA1 (patch-ba) = dd8f89952d7f40c9a979e362758775f093e047bc
SHA1 (patch-bb) = 7c6fe21b6328dddce2a079b0a1c7ae0bee817bae
+SHA1 (patch-ca) = 95f5a515fe3dafd75d077e0591e88a34447152ff
+SHA1 (patch-cb) = 301205b29db1ca60f06b2dc0423f5f911eabcd18
diff --git a/lang/python23-pth/patches/patch-ca b/lang/python23-pth/patches/patch-ca
new file mode 100644
index 00000000000..337d046d66c
--- /dev/null
+++ b/lang/python23-pth/patches/patch-ca
@@ -0,0 +1,54 @@
+$NetBSD: patch-ca,v 1.1 2004/06/14 02:31:13 lukem Exp $
+
+--- Python/pythonrun.c.orig 2004-03-23 07:41:47.000000000 +1100
++++ Python/pythonrun.c
+@@ -1581,13 +1581,13 @@ initsigs(void)
+ {
+ #ifdef HAVE_SIGNAL_H
+ #ifdef SIGPIPE
+- signal(SIGPIPE, SIG_IGN);
++ PyOS_setsig(SIGPIPE, SIG_IGN);
+ #endif
+ #ifdef SIGXFZ
+- signal(SIGXFZ, SIG_IGN);
++ PyOS_setsig(SIGXFZ, SIG_IGN);
+ #endif
+ #ifdef SIGXFSZ
+- signal(SIGXFSZ, SIG_IGN);
++ PyOS_setsig(SIGXFSZ, SIG_IGN);
+ #endif
+ #endif /* HAVE_SIGNAL_H */
+ PyOS_InitInterrupts(); /* May imply initsignal() */
+@@ -1684,20 +1684,19 @@ PyOS_sighandler_t
+ PyOS_setsig(int sig, PyOS_sighandler_t handler)
+ {
+ #ifdef HAVE_SIGACTION
+- struct sigaction context;
+- PyOS_sighandler_t oldhandler;
+- /* Initialize context.sa_handler to SIG_ERR which makes about as
+- * much sense as anything else. It should get overwritten if
+- * sigaction actually succeeds and otherwise we avoid an
+- * uninitialized memory read.
+- */
+- context.sa_handler = SIG_ERR;
+- sigaction(sig, NULL, &context);
+- oldhandler = context.sa_handler;
++ struct sigaction context, ocontext;
+ context.sa_handler = handler;
+- sigaction(sig, &context, NULL);
+- return oldhandler;
++ sigemptyset(&context.sa_mask);
++ context.sa_flags = 0;
++ if (sigaction(sig, &context, &ocontext) == -1)
++ return SIG_ERR;
++ return ocontext.sa_handler;
+ #else
+- return signal(sig, handler);
++ PyOS_sighandler_t oldhandler;
++ oldhandler = signal(sig, handler);
++#ifdef HAVE_SIGINTERRUPT
++ siginterrupt(sig, 1);
++#endif
++ return oldhandler;
+ #endif
+ }
diff --git a/lang/python23-pth/patches/patch-cb b/lang/python23-pth/patches/patch-cb
new file mode 100644
index 00000000000..53944cda97e
--- /dev/null
+++ b/lang/python23-pth/patches/patch-cb
@@ -0,0 +1,24 @@
+$NetBSD: patch-cb,v 1.1 2004/06/14 02:31:13 lukem Exp $
+
+--- Modules/signalmodule.c.orig 2003-03-14 00:56:53.000000000 +1100
++++ Modules/signalmodule.c
+@@ -137,9 +137,6 @@ signal_handler(int sig_num)
+ return;
+ }
+ #endif
+-#ifdef HAVE_SIGINTERRUPT
+- siginterrupt(sig_num, 1);
+-#endif
+ PyOS_setsig(sig_num, signal_handler);
+ }
+
+@@ -217,9 +214,6 @@ signal_signal(PyObject *self, PyObject *
+ }
+ else
+ func = signal_handler;
+-#ifdef HAVE_SIGINTERRUPT
+- siginterrupt(sig_num, 1);
+-#endif
+ if (PyOS_setsig(sig_num, func) == SIG_ERR) {
+ PyErr_SetFromErrno(PyExc_RuntimeError);
+ return NULL;