From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38671 invoked by alias); 19 Aug 2018 14:33:57 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 38658 invoked by uid 89); 19 Aug 2018 14:33:56 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=download, UD:This, H*c:PHrt, UD:Note X-HELO: sonic307-11.consmr.mail.ne1.yahoo.com Received: from sonic307-11.consmr.mail.ne1.yahoo.com (HELO sonic307-11.consmr.mail.ne1.yahoo.com) (66.163.190.34) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 19 Aug 2018 14:33:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1534689233; bh=JZ3K0554+cFtzs5OyQ0YGYQe/SoSX7xCZpCYuiNJYWs=; h=Date:From:Reply-To:To:Subject:References:From:Subject; b=tY+6XoVr5XwZ4aTZUlAuo+0+aiQ2ZyHYUGYZgtcV2o0nxE7TOEheRII5ka8e1NXxWA/g0kJW2tBdMmGVHuzvLDyPHgPE3OLvL2g/YOh9ZFGz8EqtcVWGwE0NM36cGKZgaV1XO2KmOAWmtsNS5gt6/PMKCNWxxF/tuyWVCnlm4n2+RpJjPSjbRLA82gm5nMc+1OCXT+LSkUd1KAk/VISPi42rPJngppzQKWh/0CUCHdxleditocSCfn/i/83XEryzPncjdj2E5dEfWzxfonrDMHpnCuEQ2sjwMlueJuKPlul/solsUOOToAnwf5GxbBXfSKMxroZ2+y3vUgxsYHeTYg== Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.ne1.yahoo.com with HTTP; Sun, 19 Aug 2018 14:33:53 +0000 Date: Sun, 19 Aug 2018 17:22:00 -0000 From: "Donald Krieger via cygwin" Reply-To: Donald Krieger Reply-To: Donald Krieger To: "cygwin@cygwin.com" Message-ID: <1573638389.438706.1534689231242@mail.yahoo.com> Subject: Re: stdbuf does not work MIME-Version: 1.0 References: <1573638389.438706.1534689231242.ref@mail.yahoo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2018-08/txt/msg00263.txt.bz2 Thank you again, Eliot, for this direction.I haven't had time to get everyt= hing working but winpty does appear to work.Note that the undocumented swit= ch,=C2=A0=C2=A0-Xallow-non-tty must be included to use pipes.This now works= , i.e. the text output from xgraph shows up immediately. =C2=A0 =C2=A0 winpty=C2=A0=C2=A0-Xallow-non-tty xgraph | cat -A winpty may be found here:=C2=A0 =C2=A0=C2=A0https://github.com/rprichard/wi= nptyThe download is for the source. I was able to make it without a hiccup = by doing the following in directory winpty-master:=C2=A0 =C2=A0./configure= =C2=A0 =C2=A0make=C2=A0 =C2=A0make install rprichard includes he "undocumented" switches here:=C2=A0 =C2=A0=C2=A0https= ://github.com/rprichard/winpty/issues/103 Thanks again. Best - Don From: Eliot Moss To: cygwin@cygwin.com=20 Sent: Saturday, August 18, 2018 1:01 PM Subject: Re: stdbuf does not work =20=20 Donald emailed me directly that this: xgraph ... | strbuf -oL -eL tr -d '\015' | ... does not fix the problem.=C2=A0 While I don't recall his ever having descri= bed "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-unbu= ffer-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:=C2=A0 =C2=A0 =C2=A0 http://cygwin.com/problems.html FAQ:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 http://c= ygwin.com/faq/ Documentation:=C2=A0 =C2=A0 =C2=A0 =C2=A0 http://cygwin.com/docs.html Unsubscribe info:=C2=A0 =C2=A0 =C2=A0 http://cygwin.com/ml/#unsubscribe-sim= ple =20=20=20 -- 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