Subject: Re: RXVT Problem with buffering of application output.
From: Ayamico Hamasaki <[email-masked]>
To: Rick Rankin <[email-masked]>, "Fletcher, Bob \(GEAE, IT\)" <[email-masked]>, [email-masked]
Cc: "[email-masked]'" <[email-masked]>
Date: Thu, 20 Mar 2003 19:22:09 -0800 (PST)

As I have done more researches on this. I agreed with
Christopher Faylor that is because of the fact that
cygwin's ptys are actually pipes. Native Windows
program cannot recognize cygwin's pty.

More details of the problem are described in
http://www.khngai.com/emacs/tty.php

However, I do not buy the solution that the only
alternative is to change the native app's buffering.
There are thousands (or may be millions) of these
applications written by 3rd parties out there. I do
not have the source codes to recompile them.

I am using a lot of these programs from day to day.
For example, the Clearcase command line programs. All
the programs require user inputs will exhibit the
output buffering problem.

This almost makes rxvt un-usable. I am not saying this
is a rxvt problem. This could be the MS Windows
problem. I just hope that someone will come out with
an intelligent solution.

Best Regards,
Ayamico Hamasaki.

--- Rick Rankin <[email-masked]> wrote:
> In the absence of addtional context, I would say
> that this is a Perl issue, not
> an RXVT issue. By default, Perl buffers STDOUT. If
> you add
> 
> use IO::Handle;
> STDOUT->autoflush(1);
> 
> to the script below, you'll see the prompt just fine
> in RXVT, at least with
> CYGWIN=tty
> 
> HTH,
> 
> --Rick
> --- "Fletcher, Bob (GEAE, IT)"
> <[email-masked]> wrote:
> > 
> > A Few weeks ago ayamico at yahoo dot com posted a
> question about RXVT.  I
> > haven't seen any response and was wondering if
> anyone else is having/looking
> > at
> > this problem.
> > 
> > The previous message is:
> >
>
http://sources.redhat.com/ml/cygwin/2003-03/msg00524.html
> 2003-03-07, 4989
> > bytes
> > 
> > 
> > When we run some commertial, native windows
> applications, we don't get
> > prompts
> > written to standard out until the application
> ends. RXVT seems to be
> > buffering
> > the output.  Ayamico gave a simple example that
> shows the behavior:
> > 
> > 
> >    print ("Hello World\n");
> >    $str = <STDIN>;
> > 
> > I've been looking at stty, trying to see if a
> change to the terminal options
> > might fix it. In a cygwin window, where everything
> works as expected, 
> > 
> > in Cygwin (ie cmd.exe)
> >  stty -a shows 
> > 
> > ~ > stty -a
> > speed 38400 baud; rows 25; columns 80; line = 0;
> > intr = ^C; quit = ^\; erase = ^H; kill = ^U; eof =
> ^D; eol = <undef>;
> > eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z;
> rprnt = ^R; werase = ^W;
> > lnext = ^V; flush = ^O; min = 1; time = 0;
> > -parenb -parodd cs8 -hupcl -cstopb cread -clocal
> -crtscts
> > -ignbrk brkint -ignpar -parmrk -inpck -istrip
> -inlcr -igncr icrnl ixon -ixoff
> > -iuclc -ixany -imaxbel
> > opost -olcuc -ocrnl onlcr -onocr -onlret -ofill
> -ofdel nl0 cr0 tab0 bs0 vt0
> > ff0
> > isig icanon iexten echo -echoe -echok -echonl
> -noflsh -tostop -echoctl
> > -echoke
> > ~ >
> > 
> > In an rxvt.
> > ~ > stty -a
> > speed 38400 baud; rows 25; columns 80; line = 0;
> > intr = ^C; quit = ^\; erase = ^H; kill = ^U; eof =
> ^D; eol = M-^?; eol2 =
> > M-^?;
> > start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
> werase = ^W; lnext = ^V;
> > flush = ^O; min = 1; time = 0;
> > -parenb -parodd cs8 -hupcl -cstopb cread -clocal
> -crtscts
> > -ignbrk brkint ignpar -parmrk -inpck -istrip
> -inlcr -igncr icrnl ixon -ixoff
> > -iuclc -ixany imaxbel
> > opost -olcuc -ocrnl onlcr -onocr -onlret -ofill
> -ofdel nl0 cr0 tab0 bs0 vt0
> > ff0
> > isig icanon iexten echo echoe echok -echonl
> -noflsh -tostop echoctl echoke
> > ~ > 
> > 
> > 
> > In particular I'm wondering if the values or eol
> and eol2 effect the behavior
> > of
> > applications under rxvt, but the modifications 
> I've made to eol and eol2
> > ahven't affected the behavior of the application
> above. ( I set all the
> > option
> > in the stty windows to match the cmd.exe values,
> but nothing changed.) 
> > 
> > Is stty even relavent to a Cygwin window? 
> > 
> > Does anyone have a clue if I'm likely to be on the
> right track, ie is stty
> > relevant here. Or is the right direction into the
> rxvt source code?
> > 
> > I have 
> > 
> > CYGWIN_NT-5.0 CA1006 1.3.12(0.54/3/2) 2002-07-06
> 02:16 i686 unknown
> > 
> > Usage v2.7.2 : (XPM,menubar,.Xdefaults)
> > rxvt [-help]
> >  [-display string] [-tn string] [-geometry
> geometry] [-C] [-iconic] [-/+rv]
> >  [-/+ls] [-/+sb] [-/+sr] [-/+st] [-/+si] [-/+sk]
> [-/+ut] [-/+vb] [-bg color]
> >  [-fg color] [-pixmap file[;geom]] [-fb fontname]
> [-fn fontname]
> >  [-name string] [-title string] [-n string] [-cr
> color] [-pr color]
> >  [-bd color] [-sl number] [-mod modifier] [-e
> command arg ...]
> > 
> > 
> > I pulled an up to date copy of cygwin 13.20, and
> saw the same issue.
> > 
> > Bob.
> > 
> > 
> > 
> > 
> >            GE Aircraft Engines
> > 	______________________________________________
> > 	     Bob Fletcher
> > 	     Analysis and Engineering Systems
> > 	     GE Aircraft Engines, 
> > 	     1 Neumann Way, Evendale, OH 
> > 
> > 
> > 
> > 
> > 
> > --
> > Unsubscribe info:     
> http://cygwin.com/ml/#unsubscribe-simple
> > Bug reporting:         http://cygwin.com/bugs.html
> > Documentation:         http://cygwin.com/docs.html
> > FAQ:                   http://cygwin.com/faq/
> > 
> 

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/