X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:reply-to:reply-to:to:message-id
	:subject:mime-version:references:content-type
	:content-transfer-encoding; q=dns; s=default; b=L6apZPxTT7O9UVKd
	+xejBuGifCsPyBeLepee87syxuO2GTf04WxhRZvyj5aqm9MgMtG37+JNUc+vU57T
	Y2uJVxsicDuVl4bHC/nqTb4GSH/sAyKAmh2sM+M2p0ve9+Vc6e7u8DGZOL/7/HC6
	Bs5RPYNN3Wi9UaKtOuYRzJ0BsR4=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:reply-to:reply-to:to:message-id
	:subject:mime-version:references:content-type
	:content-transfer-encoding; s=default; bh=Wtctvt0EmNyu8XFEdjrh38
	kEH3I=; b=J49VPwhTmc6N5ONvEQYDr/KsK+vPCW8Lvs/fAf/ev90XYo4hgWF5Vw
	D174m+ORRrGbaKMpxnxZIMKUr5K5CV80a80kT5lElqSfd7JkVRE0RxOxd6AZ2xMm
	xf02HE9IY/nE8wS3S+VoHOWO0iQZzE1Ztn6hunrEmNhNfcd+xS0r4=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=download, UD:This, H*c:PHrt, UD:Note
X-HELO: sonic307-11.consmr.mail.ne1.yahoo.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1534689233; bh=JZ3K0554+cFtzs5OyQ0YGYQe/SoSX7xCZpCYuiNJYWs=; h=Date:From:Reply-To:To:Subject:References:From:Subject; b=tY+6XoVr5XwZ4aTZUlAuo+0+aiQ2ZyHYUGYZgtcV2o0nxE7TOEheRII5ka8e1NXxWA/g0kJW2tBdMmGVHuzvLDyPHgPE3OLvL2g/YOh9ZFGz8EqtcVWGwE0NM36cGKZgaV1XO2KmOAWmtsNS5gt6/PMKCNWxxF/tuyWVCnlm4n2+RpJjPSjbRLA82gm5nMc+1OCXT+LSkUd1KAk/VISPi42rPJngppzQKWh/0CUCHdxleditocSCfn/i/83XEryzPncjdj2E5dEfWzxfonrDMHpnCuEQ2sjwMlueJuKPlul/solsUOOToAnwf5GxbBXfSKMxroZ2+y3vUgxsYHeTYg==
Date: Sun, 19 Aug 2018 14:33:51 +0000 (UTC)
From: "Donald Krieger via cygwin" <cygwin@cygwin.com>
Reply-To: Donald Krieger <donnkrieger@yahoo.com>
Reply-To: Donald Krieger <donnkrieger@yahoo.com>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Message-ID: <1573638389.438706.1534689231242@mail.yahoo.com>
Subject: Re: stdbuf does not work
MIME-Version: 1.0
References: <1573638389.438706.1534689231242.ref@mail.yahoo.com>
Content-Type: text/plain; charset=UTF-8
X-IsSubscribed: yes
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id w7JEY7Jj004824

Thank you again, Eliot, for this direction.I haven't had time to get everything working but winpty does appear to work.Note that the undocumented switch,  -Xallow-non-tty must be included to use pipes.This now works, i.e. the text output from xgraph shows up immediately.
    winpty  -Xallow-non-tty xgraph | cat -A
winpty may be found here:    https://github.com/rprichard/winptyThe download is for the source. I was able to make it without a hiccup by doing the following in directory winpty-master:   ./configure   make   make install
rprichard includes he "undocumented" switches here:    https://github.com/rprichard/winpty/issues/103
Thanks again.
Best - Don

      From: Eliot Moss <moss@cs.umass.edu>
 To: cygwin@cygwin.com 
 Sent: Saturday, August 18, 2018 1:01 PM
 Subject: Re: stdbuf does not work
  
Donald emailed me directly that this:

xgraph ... | strbuf -oL -eL tr -d '\015' | ...
does not fix the problem.  While I don't recall his ever having described
"the problem" that he is trying to use strbuf to solve, I now gather that
it has to do with xgraph doing more buffering of output than he would
like, so the downstream programs are not responding in a timely way.

The general problem is that this kind of buffering is usual for pipes, and
thus what the Microsoft C RunTime (CRT) does (cygwin's C run-time does
the same thing, I believe, but strbuf can override it).

The fix is to be writing to a character ("console") device of some kind.
This post on stackoverflow gives a solution:

https://stackoverflow.com/questions/11516258/what-is-the-equivalent-of-unbuffer-program-on-windows

The solution proposed there is a program called winpty, and use of
(apparently undocumented) flags to winpty to achieve the desired effect.
I am posting back to the list rather than to Don directly, in hope that
this works and his confirmation to the list may be helpful in the future
to others trying to achieve that same effect.

Regards - Eliot

--
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



   
--
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


