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:reply-to:subject:from:to:references:message-id
	:date:mime-version:in-reply-to:content-type
	:content-transfer-encoding; q=dns; s=default; b=LVmfncctLBNEARJp
	Lye3jWAVQ/1z0C4VEqiq1ksGFBkd+8lfSuH0r3JlTGddtEGjrlbHBwd6A4uNXJmL
	Rbzf9AngKiZq3KvwPaQLU9uJjhlT4++a9y81vYSazLUDfoAZOxqROMPI4vcREPQt
	6jFSOd12nUirPsUI0iouWR6v19Y=
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:reply-to:subject:from:to:references:message-id
	:date:mime-version:in-reply-to:content-type
	:content-transfer-encoding; s=default; bh=L1zoro/jHKbqfCWOu9+3d7
	nVnGs=; b=AYzcURJAuZWajPv59Y6OTYvz+yOVAaJ0MlWdeHWzWmTcs+NFj+0yAT
	/dfdd6gWmEJF0PVSCsqOKfkSJtE9CHRrLBFvpPyAoK/VQkyl84tlEG+dsHfVIwEA
	It1WI98olfQ34yviTYwm/8Aeb/CTza7cvCHQt/aClpr4VpuNmE/Ls=
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,SPF_PASS autolearn=ham version=3.3.2 spammy=timely, recall, responding, his
X-HELO: mailsrv.cs.umass.edu
Reply-To: moss@cs.umass.edu
Subject: Re: stdbuf does not work
From: Eliot Moss <moss@cs.umass.edu>
To: cygwin@cygwin.com
References: <1925552125.164706.1534595788839.ref@mail.yahoo.com> <1925552125.164706.1534595788839@mail.yahoo.com> <a679a9c3-be81-741b-532e-b3560933f97b@cs.umass.edu> <625442829.188518.1534601860831@mail.yahoo.com> <c0ffc88a-a763-1e34-73cf-6d7592f9ba40@cs.umass.edu>
Message-ID: <f930a863-56d4-0c85-f33c-14aa4396e3c1@cs.umass.edu>
Date: Sat, 18 Aug 2018 13:00:22 -0400
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1
MIME-Version: 1.0
In-Reply-To: <c0ffc88a-a763-1e34-73cf-6d7592f9ba40@cs.umass.edu>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes

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

