delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/08/18/13:01:14

X-Recipient: archive-cygwin AT delorie DOT 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 AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT 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 AT cs DOT umass DOT edu
Subject: Re: stdbuf does not work
From: Eliot Moss <moss AT cs DOT umass DOT edu>
To: cygwin AT cygwin DOT com
References: <1925552125 DOT 164706 DOT 1534595788839 DOT ref AT mail DOT yahoo DOT com> <1925552125 DOT 164706 DOT 1534595788839 AT mail DOT yahoo DOT com> <a679a9c3-be81-741b-532e-b3560933f97b AT cs DOT umass DOT edu> <625442829 DOT 188518 DOT 1534601860831 AT mail DOT yahoo DOT com> <c0ffc88a-a763-1e34-73cf-6d7592f9ba40 AT cs DOT umass DOT 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>
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019