From: Steve T. <ste...@su...> - 2003-08-27 15:08:27
|
Hello, I'm running perl 5.8.0, Expect 1.15, Tty and Pty 1.02. When I run this code: 1. #!/usr/bin/perl 2. 3. use Epect; 4. 5. my $exp = new Expect; 6. $exp->spawn('bash') or die "Cannot spawn $sshcmd: $!\n"; 7. $exp->slave->clone_winsize_from(\*STDIN); I get: Cannot open slave : No such file or directory at /tmp/example.pm line 7 If I switch the order of lines 4 and 5, the error goes away. The problem is that the script just halts immediately with this error if I ever reference $exp->slave after I've called $exp->spawn(). Unfortunately I need this to work so that I can use the WINCH signal handler detailed in the man page. I ran a truss (strace) on the process, and found these lines: ioctl(137425816, SNDCTL_TMR_TIMEBASE, 0xbfffeca0) = -1 EBADF (Bad file descriptor) open("", O_RDWR|O_NOCTTY|O_LARGEFILE) = -1 ENOENT (No such file or directory) Any ideas why this is failing? Thanks, Steve |