This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Does Cygwin Terminal queue output to stdout?


On 1/7/12 12:49 PM, inetjunkmail wrote:
> First a quick aside to say thank you for Cygwin Terminal.  I can't
> articulate how nice it is to be freed of cmd.exe!

You were always free of cmd.exe, which is akin to bash. Now you're
also free of conhost, the closest thing windows has to a terminal
emulator.

> I have installed windump (http://www.winpcap.org/windump/) and tshark
> which is part of the WireShark package
> (http://www.wireshark.org/download.html) both of which leverage
> WinPCAP libraries (http://www.winpcap.org/).
> 
> When I run tshark or windump in a cmd.exe window (e.g. "tshark -i1
> -n") I see immediate output of network traffic seen by my network
> interface and continues to stream live network traffic information.
> 
> When I run either program in Cygwin Terminal, there is about a 20
> second delay before I see any output.  At which time it immediately
> dumps the previous 20 seconds of "queued up" output and hangs again
> for 15-20 seconds, followed by another dump of "queued up" output,
> etc...
> 
> Is there some way I can have Cygwin Terminal stream the data like cmd.exe does?

From the point of view of these programs, mintty is a pipe. When a
program thinks it's writing to a display (a tty), it typically flushes
the output after every line. But when a program thinks the user won't
see its output, a program typically flushes its buffers less often
because writing in larger chunks is more efficient. You need to
convince these non-Cygwin programs to not buffer their output. Have
you tried the conin utility?

https://code.google.com/p/mintty/source/browse/utils/conin.c

Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]