Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I have a perl script that does several things then executes the following code:
my $expectREF = Expect->new (); $expectREF->debug (2); $expectREF->raw_pty (0); $expectREF->log_user (0); $expectREF->spawn ($command); $expectREF->expect (undef, "Password: "); $expectREF->send ("$pword\n"); $expectREF->interact (\*STDIN, 'EOF');
It runs fine without using crontab.
When crontab is used, expect will exit before $command finishes running but $command continues to run in the background. What do I need to do so that expect will not exit before $command finishes?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Expect doesn't wait for an EOF with crontab
by almut (Canon) on Feb 27, 2010 at 23:59 UTC |