From: Peter E. <pe...@bo...> - 2004-05-28 16:35:37
|
Yes, the difference is whether it runs as root or not. In fact, if I pull out all the tty calls except for raw_tty(1) and don't run as root it all chugs along just fine. My calls to expect() were messy to, my lesson for 'self' this morning is don't expect '' before sending the command, just stinking send the command. It just started working here in the last 20 mins and I have some stuff to do before I can get back to cleaning this up, but I'll fire off a redux when I can. Thanks all, peter > From: Roland Giersig <RGi...@cp...> > Date: Fri, 28 May 2004 10:45:02 +0200 > To: exp...@li... > Subject: Re: [Expectperl-discuss] My tty drama > >> Note that if I ran it from the command-line (real tty) it ran fine. > > Yes, thats one thing that is still baffling me. You see, I modelled the > pty allocation code mostly after sshd, so it should work to capture even > /dev/tty of the spawned process, but it sometimes (on some systems, as a > daemon, without a user tty) doesn't. Unfortunately, sshd runs as root, > so it can do some things that normal processes cannot do, and I left out > those things (if I remember correctly, it has been a while). And pty > allocation *is* black magic, very heavy black magic indeed. > > So, the short answer is: sorry, I don't know why it doesn't work. And > that's the reason why I always ask people if there is a way to solve the > problem without using Expect, using ssh/scp/ncftp/Net::Telnet etc. > instead... > > Roland > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > |