| delorie.com/archives/browse.cgi | search |
| 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:date:from:reply-to:reply-to:to:message-id | |
| :in-reply-to:references:subject:mime-version:content-type | |
| :content-transfer-encoding; q=dns; s=default; b=qRkJZlKE0z5wWULc | |
| TRN9qJzW5pP0S/jjxHnLHnDNyNa3MsIAU+xDVBtzvJJ9x+MXMkRdFglVvmRU6aoy | |
| vjjZVDXeMoBumrpW6+Q0PMKnpilKOVfdeY5n9buFJHEJ5udfEZlGXBb09oyF+Zwn | |
| 1vXm0EZlAWu63fKmnWinIU842Ow= | |
| 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 | |
| :in-reply-to:references:subject:mime-version:content-type | |
| :content-transfer-encoding; s=default; bh=w5tdkbbpF7jBMpw5sNClHO | |
| MIPio=; b=efSakepNUAasuyRC6LYL7NtqC8uFmGkW2fDXs0RFIWpQYvACpV/+HU | |
| ubETFI91RpKoRnS14F4BDq648F+zJyKpdxXHovzPe8a8pe+cV/FpeqS9bavl8mf8 | |
| Iu/oX7r5DPTq2zk6K0MsVznp1puvP7lYYUA4mQvg9CD7bEPNn/Dn8= | |
| 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.0 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*c:HHHHHH, HX-HELO:sk:sonic31, H*UA:x64, utm_content |
| X-HELO: | sonic314-20.consmr.mail.ne1.yahoo.com |
| DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1534601867; bh=kYzOj1w0x2ew9aFoegQB8Suo7eE5qPXdLvF3QqtxUxA=; h=Date:From:Reply-To:To:In-Reply-To:References:Subject:From:Subject; b=Nwe2Os39/vcrdt6YDSP+/Ba26NUJ6Zwg5qufoIqIChX0NlgdH59ov8PG9uGqxv+H2lhiM6s2kUjp/+xdYkd6vVw50yJA2TZn2QEm7KbjjHfzGtS13mJghI4q3nzlPzld7zZTkHOe3q3fyZx7UagSbmgRlB8IHyNAObLOJ8l9wSkxWJwxFku00zSca5aC+P2kreMCr2KUf5moQU6WauEVNl/0XwRfi15jfrTxILGwej12rgqY71pEJhwIehlbeQCjmDrUwLpcs2zKxecwTPldzUATtZb7o4DPP+FvB7VSwnmuWVeKQ+sBE6efzHq/9aSckXob5fufjoxWm5P17Yo70A== |
| Date: | Sat, 18 Aug 2018 14:17:40 +0000 (UTC) |
| From: | "Donald Krieger via cygwin" <cygwin AT cygwin DOT com> |
| Reply-To: | Donald Krieger <donnkrieger AT yahoo DOT com> |
| Reply-To: | Donald Krieger <donnkrieger AT yahoo DOT com> |
| To: | "moss AT cs DOT umass DOT edu" <moss AT cs DOT umass DOT edu>, |
| "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com> | |
| Message-ID: | <625442829.188518.1534601860831@mail.yahoo.com> |
| In-Reply-To: | <a679a9c3-be81-741b-532e-b3560933f97b@cs.umass.edu> |
| 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> |
| Subject: | Re: stdbuf does not work |
| MIME-Version: | 1.0 |
| X-IsSubscribed: | yes |
| X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id w7IEI0HK006784 |
Dear Eliot,
Thanks for getting back so quickly.Program1 is a windows routine, xgraph.  http://www.xgraph.org/ms/index.htmlThis is a general purpose plotting program which writes out text whenever an operation is performed in its graphic window.
That text output is piped into Program2, a home-grown tcsh script.Program2 reads the xgraph text output one line at a time and uses it to update the display list files which xgraph is polling to keep its graphic window up to date.
Here is the test harness I'm executing inside a cygwin window. For test purposes, Program2 is cat.  stdbuf -oL -eL xgraph | cat -A
Here's a typical output which is only seen once I've terminated xgraph by clicking the appropriate button in the graphic window. The only think I did while xgraph was running was click at one location in the graphics window; that's what generated the line: Clicked at (x,y) = (-0.62324, 0.255608)
XGraph v4.38^M$Window (800 x 594)^M$0 points read.^M$^M$Error: No dimensional data was read. Cannot determine axes ranges.^M$^M$  Clicked at (x,y) = (-0.62324, 0.255608)^M$Exiting XGraph.^M$
I tried 0 (zero) instead of L in the stdbuf switches just because.I also tried using stdbuf -i0 Program2in case that might make a difference.
I can easily eliminate the <cr>:Â stdbuf -oL -eL xgraph | tr -d "\015" | cat -AThis produces the same output but with the ^M 's removed.I don't know how to alter the windows line endings but would like to.
Thanks again and for any further thoughts.
Best - Don
From: Eliot Moss <moss AT cs DOT umass DOT edu>
To: cygwin AT cygwin DOT com
Sent: Saturday, August 18, 2018 9:14 AM
Subject: Re: stdbuf does not work
On 8/18/2018 8:36 AM, Donald Krieger via cygwin wrote:
> Dear list,
> I require line buffered output from program1 and line buffered input to program2.The following works under Linux but not under Cygwin.  stdbuf -oL -eL program 1 |& program2
>
> I've searched the archive without success.I have tried -o0 -e0 -i0 and have also tried
>Â Â stdbuf -oL -eL program1 |& stdbuf -i0 program2
> I have a fresh installation of cygwin as of a few months ago: uname -a       yields:CYGWIN_NT-10.0 DESKTOP-S92525R 2.10.0(0.325/5/3) 2018-02-02 15:16 x86_64 Cygwin
>  stdbuf --version  yields:stdbuf (GNU coreutils) 8.26Packaged by Cygwin (8.26-2)Copyright (C) 2016 Free Software Foundation, Inc....
Some thoughts to consider:
- -i0 means unbuffered; did you write the wrong description above?
- As noted in the strbuf man page, some programs don't use streams and thus are
 not affected by strbuf settings. I agree this is not something likely to
 change for the same program ported from Linux to Cygwin.
- How do you have line endings set up on Cygwin or in any files you are
 processing? The usual Windows line ending being CR-LF instead of Linux's
 LF can confuse some programs.
It might also help potential responders to know a little more about what program1 and
program2 are. Are they Windows or Cygwin programs?
Regards - EM
--
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
| | Virus-free. www.avast.com |
--
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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |