From a95007e2081d3b2f6008a3503c1eca7a498228ad Mon Sep 17 00:00:00 2001 From: Bruce M Simpson Date: Sat, 14 Mar 2009 09:33:40 +0000 Subject: Add support for building Python against GNU Portable Threads (Pth), and also add experimental support for POSIX semaphores in FreeBSD 7-STABLE and up. The option knobs PTH and SEM respectively are added to enable this behaviour. Python is able to use POSIX semaphores for thread synchronization in threading, and prefers them. The multiprocessing module in Python 2.6 requires POSIX semaphores, however, the FreeBSD rtld and malloc need further work to allow a process to call pthread_create() immediately after fork() as it is not something allowed by a strict interpretation of the POSIX specs; therefore allow GNU Pth to be used until the situation is resolved. Approved by: miwi --- lang/python27/files/patch-Lib_test_test_threading.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 lang/python27/files/patch-Lib_test_test_threading.py (limited to 'lang/python27/files/patch-Lib_test_test_threading.py') diff --git a/lang/python27/files/patch-Lib_test_test_threading.py b/lang/python27/files/patch-Lib_test_test_threading.py new file mode 100644 index 000000000000..011ae85349a4 --- /dev/null +++ b/lang/python27/files/patch-Lib_test_test_threading.py @@ -0,0 +1,11 @@ +--- Lib/test/test_threading.py.bak 2009-03-12 07:59:17.000000000 +0000 ++++ Lib/test/test_threading.py 2009-03-12 10:48:04.000000000 +0000 +@@ -382,7 +382,7 @@ + return + # Skip platforms with known problems forking from a worker thread. + # See http://bugs.python.org/issue3863. +- if sys.platform in ('freebsd4', 'freebsd5', 'freebsd6', 'os2emx'): ++ if sys.platform in ('freebsd4', 'freebsd5', 'freebsd6', 'freebsd7', 'freebsd8', 'os2emx'): + print >>sys.stderr, ('Skipping test_3_join_in_forked_from_thread' + ' due to known OS bugs on'), sys.platform + return -- cgit v1.2.3