From: Austin S. <te...@of...> - 2002-06-06 20:01:30
|
On Thu, Jun 06, 2002 at 01:57:15PM -0500, Blackstone, J. David wrote: > * My spawned processs doesn't produce any output, and Expect.pm doesn't wait > for it to end. > > [Might need to reword this. Suggestions? See > http://use.perl.org/~djberg96/journal/5430/] > > Spawning a process just starts it up. From then on, any interaction with > your process, including waiting for it to end, is up to you. Usually this > involves expect()ing output. If there is no output, however, you will need > to expect() a special signal sent when the process ends called eof. Maybe I'm missing something. Why do I _need_ to expect eof? Expect should return at eof. It should also be setting $err. $process->expect(undef); if( $process->error() =~ /EOF/ ) { waitpid($process->pid()); } Austin |