stdbuf does not work
Eliot Moss
moss@cs.umass.edu
Sun Aug 19 00:47:00 GMT 2018
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
More information about the Cygwin
mailing list