From: <we...@sy...> - 2004-04-15 20:33:30
|
I couldn't find any archives to search, so I hope this isn't something rehashed a million times already... Expect works fine on RedHat 7.2 with Perl 5.6.1. However, when I try to run it on RedHat ES 3.0 with Perl 5.8.0, it hangs on the spawn if the perl debugger is in use. if (! ($pwd = Expect->spawn("/usr/bin/passwd '$user'")) ){ The hang only happens if I am using the perl debugger. If I disable the debugger, Expect works correctly. Of course, it's a bit tough to debug the rest of my program... Is there any way around this? Some of the trace after hitting CTRL C: 147: open(STDOUT,">&". $slv->fileno()) 148: or die "Couldn't reopen STDOUT for writing, $!\n"; IO::Handle::fileno(/opt/syntegra/lib/perl5/5.8.0/i686-linux/IO/Handle.pm:378 ): 378: @_ == 1 or croak 'usage: $io->fileno()'; IO::Handle::fileno(/opt/syntegra/lib/perl5/5.8.0/i686-linux/IO/Handle.pm:379 ): 379: fileno($_[0]); Expect::spawn(/opt/syntegra/lib/perl5/site_perl/5.8.0/Expect.pm:149): 149: close(STDERR); Expect::spawn(/opt/syntegra/lib/perl5/site_perl/5.8.0/Expect.pm:150): 150: open(STDERR,">&". $slv->fileno()) 151: or die "Couldn't reopen STDERR for writing, $!\n"; IO::Handle::fileno(/opt/syntegra/lib/perl5/5.8.0/i686-linux/IO/Handle.pm:378 ): 378: @_ == 1 or croak 'usage: $io->fileno()'; IO::Handle::fileno(/opt/syntegra/lib/perl5/5.8.0/i686-linux/IO/Handle.pm:379 ): 379: fileno($_[0]); Expect::spawn(/opt/syntegra/lib/perl5/site_perl/5.8.0/Expect.pm:153): 153: { exec(@cmd) }; Expect::spawn(/opt/syntegra/lib/perl5/site_perl/5.8.0/Expect.pm:153): 153: { exec(@cmd) }; Expect::spawn(/opt/syntegra/lib/perl5/site_perl/5.8.0/Expect.pm:125): 125: die "Cannot sync with child: $!" if not defined $errstatus; Wes |