[csw-devel] SF.net SVN: gar:[8427] csw/mgar/pkg/python/branches

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Tue Feb 9 10:02:25 CET 2010


Revision: 8427
          http://gar.svn.sourceforge.net/gar/?rev=8427&view=rev
Author:   dmichelsen
Date:     2010-02-09 09:02:25 +0000 (Tue, 09 Feb 2010)

Log Message:
-----------
python: Make branch with patch for Python bug 7242

Modified Paths:
--------------
    csw/mgar/pkg/python/branches/python-2.6.4+patch7242/Makefile
    csw/mgar/pkg/python/branches/python-2.6.4+patch7242/checksums

Added Paths:
-----------
    csw/mgar/pkg/python/branches/python-2.6.4+patch7242/
    csw/mgar/pkg/python/branches/python-2.6.4+patch7242/files/patch_2.diff.txt

Modified: csw/mgar/pkg/python/branches/python-2.6.4+patch7242/Makefile
===================================================================
--- csw/mgar/pkg/python/trunk/Makefile	2010-02-08 10:41:51 UTC (rev 8406)
+++ csw/mgar/pkg/python/branches/python-2.6.4+patch7242/Makefile	2010-02-09 09:02:25 UTC (rev 8427)
@@ -45,6 +45,11 @@
 PATCHFILES += setup.diff
 PATCHFILES += getpass.patch
 
+# Fix for Python bug 7242: Forking in a thread raises RuntimeError
+#   http://bugs.python.org/issue7242
+# This shows up in failing tests on Mercurial
+PATCHFILES += patch_2.diff.txt
+
 # Test for sunaudiodev fails.
 SKIPTEST = 1
 

Modified: csw/mgar/pkg/python/branches/python-2.6.4+patch7242/checksums
===================================================================
--- csw/mgar/pkg/python/trunk/checksums	2010-02-08 10:41:51 UTC (rev 8406)
+++ csw/mgar/pkg/python/branches/python-2.6.4+patch7242/checksums	2010-02-09 09:02:25 UTC (rev 8427)
@@ -6,6 +6,7 @@
 33f4094ee46ce865d3973a197f3fb4a0  makesetup.diff
 22c5f741b1744213eaef0818ab280ad5  modules.diff
 afcc79a94e2f8a576c7906a9700e35a0  multiprocess.diff
+851c64bcab0b4d91d2c14f7f63d53500  patch_2.diff.txt
 05724da367b025ce525de2bb704af6e3  pyport.diff
 a1d114e8a20870675649aeef007a9cac  python-config-in.diff
 1d2763e140ff30a491b3ce11d1a44f97  setup.diff

Added: csw/mgar/pkg/python/branches/python-2.6.4+patch7242/files/patch_2.diff.txt
===================================================================
--- csw/mgar/pkg/python/branches/python-2.6.4+patch7242/files/patch_2.diff.txt	                        (rev 0)
+++ csw/mgar/pkg/python/branches/python-2.6.4+patch7242/files/patch_2.diff.txt	2010-02-09 09:02:25 UTC (rev 8427)
@@ -0,0 +1,63 @@
+diff -ur Python-2.6.4/Modules/posixmodule.c Python-2.6.4.patched/Modules/posixmodule.c
+--- Python-2.6.4/Modules/posixmodule.c	2009-09-16 16:06:36.000000000 -0400
++++ Python-2.6.4.patched/Modules/posixmodule.c	2010-01-22 10:00:18.000000000 -0500
+@@ -3634,11 +3634,12 @@
+ 	int result;
+ 	_PyImport_AcquireLock();
+ 	pid = fork1();
++	if (pid == 0)
++		PyOS_AfterFork();
++
+ 	result = _PyImport_ReleaseLock();
+ 	if (pid == -1)
+ 		return posix_error();
+-	if (pid == 0)
+-		PyOS_AfterFork();
+ 	if (result < 0) {
+ 		/* Don't clobber the OSError if the fork failed. */
+ 		PyErr_SetString(PyExc_RuntimeError,
+@@ -3663,11 +3664,12 @@
+ 	int result;
+ 	_PyImport_AcquireLock();
+ 	pid = fork();
++	if (pid == 0)
++		PyOS_AfterFork();
++
+ 	result = _PyImport_ReleaseLock();
+ 	if (pid == -1)
+ 		return posix_error();
+-	if (pid == 0)
+-		PyOS_AfterFork();
+ 	if (result < 0) {
+ 		/* Don't clobber the OSError if the fork failed. */
+ 		PyErr_SetString(PyExc_RuntimeError,
+@@ -3781,11 +3783,12 @@
+ 
+ 	_PyImport_AcquireLock();
+ 	pid = forkpty(&master_fd, NULL, NULL, NULL);
++	if (pid == 0)
++		PyOS_AfterFork();
++
+ 	result = _PyImport_ReleaseLock();
+ 	if (pid == -1)
+ 		return posix_error();
+-	if (pid == 0)
+-		PyOS_AfterFork();
+ 	if (result < 0) {
+ 		/* Don't clobber the OSError if the fork failed. */
+ 		PyErr_SetString(PyExc_RuntimeError,
+diff -ur Python-2.6.4/Python/import.c Python-2.6.4.patched/Python/import.c
+--- Python-2.6.4/Python/import.c	2009-09-16 16:06:36.000000000 -0400
++++ Python-2.6.4.patched/Python/import.c	2010-01-26 07:03:14.000000000 -0500
+@@ -303,10 +303,9 @@
+ void
+ _PyImport_ReInitLock(void)
+ {
+-#ifdef _AIX
+ 	if (import_lock != NULL)
+ 		import_lock = PyThread_allocate_lock();
+-#endif
++        import_lock_thread = PyThread_get_thread_ident();
+ }
+ 
+ #endif


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list