Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Thu, 20 Mar 2003 23:18:31 -0500 (EST) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: Ayamico Hamasaki cc: cygwin AT cygwin DOT com Subject: Re: RXVT Problem with buffering of application output. In-Reply-To: <20030321032209.3955.qmail@web13206.mail.yahoo.com> Message-ID: Importance: Normal MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Ayamico, FYI, you could try writing a Cygwin wrapper program that would capture the output of a Windows process and print it out using Cygwin functions. This program should be able to recognize Cygwin ttys. Search MSDN for STARTF_USESTDHANDLES, or see , for examples of how to capture process output. Igor On Thu, 20 Mar 2003, Ayamico Hamasaki wrote: > 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 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)" > > 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 = ; > > > > > > 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 = ; > > > eol2 = ; 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. -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk! -- /usr/games/fortune -- 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/