Chas. Owens wrote:
On Tue, Oct 21, 2008 at 09:40, Sandeep Kumar
<[EMAIL PROTECTED]> wrote:
hi all,
i am using expect module to connect to a remote server. i am getting the
following error.
Cannot sync with child: Interrupted system call at /perl_path/lib/Expect.pm
line 134,
somebody please let me know a solution for this.
thanks,
sandeep.
Can you duplicate the problem with a small script and post the small
script here so others can replicate your issue? Often I find the
problem just by writing a smaller version of what I am trying to do.
i have been using expect regularly, and its the first time seeing this
problem. i already did what you just suggested, and it worked fine.
the problem is not even a persistent one, and happening only sometimes.
below is the shortened version, which worked fine.
i would like to know, what "interrupted system call" means.
use strict;
use warnings;
use Expect;
use IO::Tty;
$host = "192.168.1.72";
$passwd= "xyz";
$user = "xyz";
$t= "file.txt";
my $connect = Expect->spawn("scp $t [EMAIL PROTECTED]:/work/$user/");
$connect->expect(30,"\s") ||die "junk1";
print $connect $passwd."\n";
$connect->expect(30,"-re",'$\s');
$connect->soft_close();