From: John M. <ex...@h0...> - 2003-04-22 12:40:32
|
On Tue, Apr 22, 2003 at 02:21:09PM +0200, Sascha Gagalon (02838) wrote: > I am using Expect-1.15 and IO-Tty-1.02 on Sun Solaris 2.6 > > A little code: > > #!/tools/perl-5.6.0.sol26/bin/perl > > #use strict; > $^W = 1; # warnings too > > > use Expect; > #$Expect::Exp_Internal = 1; > #$Expect::Debug = 1; > > > &start; > $mtnm->hard_close(); > exit(0); > > > > sub start > { > $mtnm = Expect->spawn("csteMTNM -c"); > $mtnm->raw_pty(1); > $mtnm->log_file("rmtest.log", "w"); > $mtnm->expect(30, "STARTUP FINISHED\r\n"); > } > > > What's wrong? > I believe that you need to place $mtnm->raw_pty(1); BEFORE $mtnm = Expect->spawn("csteMTNM -c"); At least my notes tell that I must set pty to raw mode before spawning... -- John Mahoney <ex...@h0...> |