[Chicago] capturing output from subprocesses

Noel Thomas Taylor nttaylor at uchicago.edu
Tue Nov 15 00:48:57 CET 2005


Hi Jess,

I've set up a guest account for you on our Irix box. Please login at 
jess at cube.uchicago.edu. The password is 'password', which you'll probably 
want to change when you first login. Let me know if you have any problem.

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)

> What do you mean the child's termination signal will not be picked up?
> Are you saying the SIGCHLD isn't sent to the parent process? Or isn't
> received for some reason? If there is a difference in the select
> implementation, we can probably work around that with a timer, but I
> think that's probably how they implement it... The other thing is if
> the pty isn't closed correctly, we might use the exception fd's from
> select to know when it's done. Either way, I'll have to take a closer
> look at it.

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.

> Hopefully you have a C compiler on there too. ;)

There is a C compiler, so hopefully that won't be a problem. Let me know 
if I can do anything else to help. I'm very grateful for all your 
assistance so far.

best,

Noel Taylor


More information about the Chicago mailing list