From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 129784 invoked by alias); 18 Aug 2018 13:14:16 -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 129772 invoked by uid 89); 18 Aug 2018 13:14:15 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=BAYES_50,SPF_PASS autolearn=ham version=3.3.2 spammy=donald, Donald, krieger, stdbuf X-HELO: mailsrv.cs.umass.edu Received: from mailsrv.cs.umass.edu (HELO mailsrv.cs.umass.edu) (128.119.240.136) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 18 Aug 2018 13:14:14 +0000 Received: from [192.168.0.30] (cpe-108-183-164-222.maine.res.rr.com [108.183.164.222]) by mailsrv.cs.umass.edu (Postfix) with ESMTPSA id 9EA34401CE47; Sat, 18 Aug 2018 09:14:11 -0400 (EDT) Reply-To: moss@cs.umass.edu Subject: Re: stdbuf does not work To: cygwin@cygwin.com References: <1925552125.164706.1534595788839.ref@mail.yahoo.com> <1925552125.164706.1534595788839@mail.yahoo.com> From: Eliot Moss Message-ID: Date: Sat, 18 Aug 2018 15:27:00 -0000 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: <1925552125.164706.1534595788839@mail.yahoo.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2018-08/txt/msg00249.txt.bz2 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