[Python-bugs-list] [ python-Bugs-686667 ] os.spawnv(P_WAIT, ...) on Linux doesn't handle EINTR

SourceForge.net noreply@sourceforge.net
Fri, 14 Feb 2003 09:47:18 -0800


Bugs item #686667, was opened at 2003-02-14 18:47
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=686667&group_id=5470

Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Bernhard Herzog (bernhard)
Assigned to: Nobody/Anonymous (nobody)
Summary: os.spawnv(P_WAIT, ...) on Linux doesn't handle EINTR

Initial Comment:
The implementation of os.spawnv when called with the
P_WAIT flag calls waitpid to wait for the subprocess.
If this function is aborted early because of a signal,
i.e. if it raises OSError with EINTR, it should be
called again.

I ran across this bug when trying to write a test case
for a script that stops another process. Both the
script and the other process are executed as
subprocesses of the test program. The stop script is
executed with os.spawnv(P_WAIT,  ...) to wait until the
script completed. Unfortunately when it stops the other
process a SIGCHLD is sent to the test program which
then aborts the waitpid with an exception.

Tested with Python 2.1.3, 2.2 and CVS from 2003-02-13
Platform: Debian GNU/Linux, Kernel 2.4.20

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=686667&group_id=5470