public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Eliot Moss <moss@cs.umass.edu>
To: cygwin@cygwin.com
Subject: Re: stdbuf does not work
Date: Sun, 19 Aug 2018 00:47:00 -0000	[thread overview]
Message-ID: <f930a863-56d4-0c85-f33c-14aa4396e3c1@cs.umass.edu> (raw)
In-Reply-To: <c0ffc88a-a763-1e34-73cf-6d7592f9ba40@cs.umass.edu>

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

  parent reply	other threads:[~2018-08-18 17:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1925552125.164706.1534595788839.ref@mail.yahoo.com>
2018-08-18 15:23 ` Donald Krieger via cygwin
2018-08-18 15:27   ` Eliot Moss
2018-08-18 17:01     ` Donald Krieger via cygwin
2018-08-18 20:17       ` Eliot Moss
2018-08-18 22:31         ` Marco Atzeri
2018-08-19  0:47         ` Eliot Moss [this message]
     [not found] <1573638389.438706.1534689231242.ref@mail.yahoo.com>
2018-08-19 17:22 ` Donald Krieger via cygwin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f930a863-56d4-0c85-f33c-14aa4396e3c1@cs.umass.edu \
    --to=moss@cs.umass.edu \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).