[Python-bugs-list] [ python-Bugs-608635 ] Unix popen does not return exit status
noreply@sourceforge.net
noreply@sourceforge.net
Thu, 12 Sep 2002 15:03:35 -0700
Bugs item #608635, was opened at 2002-09-12 23:03
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=608635&group_id=5470
Category: Python Library
Group: Python 2.2.1
Status: Open
Resolution: None
Priority: 5
Submitted By: Barry Alan Scott (barry-scott)
Assigned to: Nobody/Anonymous (nobody)
Summary: Unix popen does not return exit status
Initial Comment:
The documentation for os.popen[234] states that the close
will
return the rc of the process. This works well on
windows, but the
unix code does not work, None is
returned.
The
attached version of popen2.py fixes the problem
by wrapping
the fromchild fd with an object that
implements the
documented close() behaviour.
I have also extended the
test() to cover testing the
rc and run on FreeBSD against
2.2.1
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=608635&group_id=5470