-   Programming (
-   -   TCL/expect - parent hangs when child dies (

Hewson 03-27-2007 12:08 PM

TCL/expect - parent hangs when child dies

I have an expect program that calls

set ftpChildPID [exec trafficAux &]
then after sometime calls


exec kill -HUP $ftpChildPID
the child process (also written in TCL/expect)


trap {
        set isdone 1

the intention is to send the child process a signal and allow the child to exit gracefully.

Currently when this code is executed, the child exits gracefully and then the parent process becomes unresponsive.

Any thoughts?


indienick 03-27-2007 08:44 PM

Would you be at all willing to share more of the code? So as we can get a better idea of what is going on?

As for now, try passing a sleep call after you kill the child. Something like "sleep 3".

My dad does alot of Expect scripting, and he has to throw those in all over the place to keep the script from getting ahead of itself; force the program flow.

All times are GMT -5. The time now is 02:32 PM.