[Chicago] capturing output from subprocesses
Jess Balint
jbalint at gmail.com
Tue Nov 15 01:42:23 CET 2005
On 11/14/05, Noel Thomas Taylor <nttaylor at uchicago.edu> wrote:
> You'll find a copy of your latest script, 'child_process_3.py', waiting
> for you in your home directory, along with a couple of 'ticker' programs
> and a copy of "pexpect.py", which has a hack for circumventing this
> problem on Irix (assuming it's the same problem)
The os.openpty() call seems to be working fine on your installation.
Maybe it was added after the 2.2 that I have on my Solaris box? I just
checked and it's there in 2.4 (ActiveState) on Solaris. So now it
seems to work OK on your IRIX box (Python 2.3.5) and the Solaris and
Linux boxes I have tested, both with Python 2.4.
> Unfortunately, I'm not sure myself exactly what's happening, only that the
> parent will wait on the child indefinitely. It will not abort when the
> timeout value passed to the select call is exceeded, nor will it report
> back when the child terminates normally.
It's putting the fd in the exception fd set. I just added a call to
check for it. The timeout was working it just re-entered the loop
because there was no condition to break if nothing was read.
Let me know how it's working for you now.
Jess
More information about the Chicago
mailing list