[Patches] [ python-Patches-489173 ] Make os.spawnv not block the interpreter
noreply@sourceforge.net
noreply@sourceforge.net
Thu, 06 Dec 2001 15:57:30 -0800
Patches item #489173, was opened at 2001-12-04 17:22
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=489173&group_id=5470
Category: Core (C code)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Anthony Roach (anthonyroach)
Assigned to: Tim Peters (tim_one)
Summary: Make os.spawnv not block the interpreter
Initial Comment:
Someone forgot to bracket the calls to _spawnv() and
_spawnve() with Py_BEGIN_ALLOW_THREADS and
Py_END_ALLOW_THREADS. This patch also fixes an error in
the docstrings for os.spawnv and os.spawnve.
----------------------------------------------------------------------
>Comment By: Tim Peters (tim_one)
Date: 2001-12-06 15:57
Message:
Logged In: YES
user_id=31435
To stevenknight: I don't see a description of "a bug"
here, so it's hard to say whether this is a fix.
If an app doesn't want to wait for a spawned program to
complete, passing P_NOWAIT as the mode argument is the
usual cure.
There is some risk attached to this patch: it's possible
that an app passing P_WAIT today is relying on that their
program blocks until the spawned program completes. I
expect that's a small risk, but any risk makes me
uncomfortable for 2.2 since 2.2 had its final beta
release. So I'd like to hear the case for why this patch
is important (as above, there isn't a bug description here,
just a purported cure).
Note that if 2.2 were still in alpha test, I'd wouldn't
think more than twice <wink> about applying the patch.
----------------------------------------------------------------------
Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2001-12-06 07:57
Message:
Logged In: YES
user_id=3066
Hmmm... it would take some time to get a Windows build
environment up on this machine. I'll assign this to Tim;
hopefully someone can contribute a test case for this so
there will be some chance he'll get to this for Python 2.2.
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2001-12-06 07:37
Message:
Logged In: YES
user_id=6380
Since it's Windows specific, can you test it?
----------------------------------------------------------------------
Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2001-12-06 07:25
Message:
Logged In: YES
user_id=3066
Are there any objections to my checking this in for Python 2.2?
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2001-12-06 06:01
Message:
Logged In: YES
user_id=6380
I see no problem with the patch.
----------------------------------------------------------------------
Comment By: Steven Knight (stevenknight)
Date: 2001-12-06 04:04
Message:
Logged In: YES
user_id=216109
As the SCons project lead, it would be nice to have a
response from someone on the Python team acknowledging that
this is the right fix for this bug. As it is, it looks like
we're going to have to ship SCons without -j support on
WIN32 systems due to this problem in Python, but it would be
nice to be able to point people to this patch with
confidence, if they want to add the support to their own
copy of Python themselves.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=489173&group_id=5470