From: Hemming, C. <Cli...@AF...> - 2000-11-10 19:52:27
|
So how would I specify 'EOF' in the expect statement? > -----Original Message----- > From: Roland Giersig [SMTP:Rol...@al...] > Sent: Thursday, November 09, 2000 01:54 > To: Hemming, Cliff > Cc: exp...@li... > Subject: Re: Expect.pm > > "Hemming, Cliff" wrote: > > I have found a interesting little problem that I was wondering if you > could > > shed some light on. When I running a process a perform a > > $TELNET->expect( undef, "Wait For this"); > > If the child process exits without sending that phrase, the expect perl > > script does not return. I was wondering if this normal behavior or if I > have > > problem. I guess I'm really asking if Expect handles signals from the > child > > processes? > > Yes, this problem has already been reported, but should > be solvable by expecting 'eof', which is activated > when the child exits, so this is probably your best bet. > > Expect does not handle SIGCHILD (which it should; I intend a > complete rewrite and have this on the feature list) but > instead relies on EOF detection from the pty. But as the > state machine is heavily patched, there might be some problems > with that also. > > I'm already investigating this, but I guess this is best solved > by a clean redesign, so it will take some time. > > Thanks for telling. > > Roland > -- > Rol...@gm... |