[pony-build] Error with stdout from plan 9

C. Titus Brown ctb at msu.edu
Wed Jul 14 20:05:27 PDT 2010

On Mon, Jul 12, 2010 at 04:19:31PM -0400, Michaelian Ennis wrote:
> so I have a /usr/mennis/src/test.rc
> this simply fails:
> #!/bin/rc
> echo failure
> exit 1
> Using call I get the following. Note that the 'echo failure' is
> printed to to the screen.  Is subprocess broken then?
> >>> p = subprocess.call('/usr/mennis/src/test.rc')
> failure

What result do you expect?  That's correct documented behavior for
subprocess, I believe; check_call would raise an exception in this
case, however.  Look at 'p.returncode' - it should be '1'.

Re your 'select' error, I think that is probably caused by a system-specific
problem with the stdout/stderr pipes in subprocess -- can you try running
this script?

import subprocess

p = subprocess.Popen('/bin/ls', shell=True, stdout=subprocess.PIPE)
(out, err) = p.communicate()

print out



More information about the pony-build mailing list