X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=2.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: <4F08B185.7050709@dancol.org> References: <4F08B185 DOT 7050709 AT dancol DOT org> Date: Mon, 9 Jan 2012 11:12:56 -0500 Message-ID: Subject: Re: Does Cygwin Terminal queue output to stdout? From: inetjunkmail To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id q09GDNPP014586 >> 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 > In case anyone is searching this in the future, windump and tshark both have a command line switch of "-l" that flushes standard output after each packet. Using this resolves the issue. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple