From owner-cvs-all@FreeBSD.ORG Thu Dec 25 14:57:07 2008 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 136731065670; Thu, 25 Dec 2008 14:57:07 +0000 (UTC) (envelope-from pgollucci@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0138B8FC19; Thu, 25 Dec 2008 14:57:07 +0000 (UTC) (envelope-from pgollucci@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id mBPEv680034166; Thu, 25 Dec 2008 14:57:06 GMT (envelope-from pgollucci@repoman.freebsd.org) Received: (from pgollucci@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id mBPEv6XJ034165; Thu, 25 Dec 2008 14:57:06 GMT (envelope-from pgollucci) Message-Id: <200812251457.mBPEv6XJ034165@repoman.freebsd.org> From: "Philip M. Gollucci" Date: Thu, 25 Dec 2008 14:57:06 +0000 (UTC) To: ports-committers@FreeBSD.org, cvs-ports@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: ports/devel/scons Makefile ports/devel/scons/files patch-engine-SCons-compat-__init__.py patch-engine-SCons-compat-_scons_subprocess.py X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2008 14:57:07 -0000 pgollucci 2008-12-25 14:57:06 UTC FreeBSD ports repository Modified files: devel/scons Makefile Added files: devel/scons/files patch-engine-SCons-compat-__init__.py patch-engine-SCons-compat-_scons_subprocess.py Log: Python's subprocess module has a race condition: Popen() constructor has a call to global "_cleanup()" function on whenever a Popen object gets created, and that call causes a check for all pending Popen objects whether their subprocess has exited - i.e. the poll() method is called for every active Popen object. See http://bugs.python.org/issue1731717 for addition details SCon's compat/_scons_subprocess.py module is just a copy of a more recent stock Python subprocess.py modified so it will work with older Python versions. The attached patch will add locks around calls to Popen and change the compat module in a way that the subprocess module is always used, no matter if Python already ships one. The rationale behind this decision is that there are many Python versions in the wild with different Popen() race condition problems. PR: ports/128845 Submitted by: Steven Kreuzer Approved by: araujo (mentor, implicit) Revision Changes Path 1.35 +1 -0 ports/devel/scons/Makefile 1.1 +29 -0 ports/devel/scons/files/patch-engine-SCons-compat-__init__.py (new) 1.1 +33 -0 ports/devel/scons/files/patch-engine-SCons-compat-_scons_subprocess.py (new)