Expect buffering question / dtterm interact question 
Author Message
 Expect buffering question / dtterm interact question

Hi,

I have a question regarding buffering.
I opened a dtterm and spawned a shell in it using "interact -u",
and then ran a startServer script in it.
Another startClient script is run in another window that
connects to the shell running startServer.

The server script prematurely exits at the same point all the time.
I think it might be that the interact buffer is full.
Is there anyway to prevent that from happening?

I have another question regarding the dtterm and interact -u command.
When I do the following, why is there no shell in the dtterm?
I had to spawn a shell and do a interact -u in it.

Quote:
>  spawn -pty -noecho

   stty raw -echo < $spawn_out(slave,name)
   regexp ".*(.)(.)" $spawn_out(slave,name) dummy c1 c2
   if {[string compare $c1 "/"] == 0} {
      set c1 "0"
   }
   set server_dtterm_pid [exec dtterm -S$c1$c2$spawn_out(slave,fd) -name
"SERVER" &]
   close -slave
   expect "\n"
   set server_dtterm_id $spawn_id

Quote:
> spawn /bin/ksh

   log_user 1
   interact -u $server_dtterm_id

Thanks in advance for answering my questions,
Sun



Tue, 27 Apr 2004 03:47:16 GMT  
 Expect buffering question / dtterm interact question

Quote:

> I have a question regarding buffering.
> I opened a dtterm and spawned a shell in it using "interact -u",

I'm already lost.  Make your description clearer!

Quote:
> and then ran a startServer script in it.
> Another startClient script is run in another window that
> connects to the shell running startServer.

> The server script prematurely exits at the same point all the time.
> I think it might be that the interact buffer is full.

Normally, Interact's buffers don't fill until the system's buffers
fill.  Are you sure your processes are consuming all the data interact
is trying to send?

Quote:
> Is there anyway to prevent that from happening?

Yes, fix the underlying problem.

Quote:
> I have another question regarding the dtterm and interact -u command.
> When I do the following, why is there no shell in the dtterm?

Try it first with xterm to make sure you have all the details right.
Then try it with dtterm.  (Shucks, why not use xterm in the first
place?)
Quote:
> I had to spawn a shell and do a interact -u in it.

> >  spawn -pty -noecho
>    stty raw -echo < $spawn_out(slave,name)
>    regexp ".*(.)(.)" $spawn_out(slave,name) dummy c1 c2
>    if {[string compare $c1 "/"] == 0} {
>       set c1 "0"
>    }
>    set server_dtterm_pid [exec dtterm -S$c1$c2$spawn_out(slave,fd) -name
> "SERVER" &]
>    close -slave
>    expect "\n"
>    set server_dtterm_id $spawn_id

> > spawn /bin/ksh
>    log_user 1
>    interact -u $server_dtterm_id

> Thanks in advance for answering my questions,
> Sun



Tue, 04 May 2004 04:16:47 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Expect: interact and buffering?

2. making better use of my CPU with interact (expect question)

3. Novice Expect question - interact and stderr

4. Expect question: interact -reset doesn't always seem to

5. expect interact question

6. Expect: interact question (what was matched?)

7. expect buffering question

8. Expect Question - expect_out(buffer)

9. "Expect" buffering question

10. Expect Buffering Question

11. expect unable to communicate with spwaned dtterm (or xterm)

12. ***Data buffering question. Long post, lots of questions

 

 
Powered by phpBB® Forum Software