Program stalls when called via Popen4?
paul at boddie.net
Fri Mar 21 18:21:25 CET 2003
Joshua Pollak <joshp at cra.com> wrote in message news:<Vrqea.6493$io.248058 at iad-read.news.verio.net>...
> Everything seems to be working correctly, EXCEPT that the popen2.Popen4
> instance I'm using to actually build our project never returns. When I
> 'watch' what the subprocess is doing by using 'ps aux', it seems that it
> has stalled on the first call to 'echo'!
Quite often with popen2 functions, it can be advisable to close the
output stream to the child process. For example (with popen3, since I
don't know what popen4 returns):
t = popen2.popen3(command)
# Close output, which is the standard input of the command.
# Read from t and t.
That might prevent certain blocking conditions from occurring.
More information about the Python-list