delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/04/24/15:50:40

X-Spam-Check-By: sourceware.org
Message-ID: <444D2C01.5080602@gmail.com>
Date: Mon, 24 Apr 2006 20:50:25 +0100
User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Redirecting bash stdin
References: <44491A56 DOT 8030809 AT gmail DOT com> <444A264D DOT 5050100 AT byu DOT net>
In-Reply-To: <444A264D.5050100@byu.net>
From: Dave <kilroyd AT googlemail DOT com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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

Eric Blake wrote:
> According to Dave on 4/21/2006 11:45 AM:
> 
>>I'm trying to get a mingw GUI application to pipe commands to cygwins
>>bash by redirecting its stdin as described here
>><http://support.microsoft.com/?id=190351>.
> 
> Why not just spawn bash with command line arguments, and use the -c flag
> to pass the commands as arguments rather than on stdin?

I'm aware of the -c flag. I may use it if I'm convinced the pipe won't
work, but really I'm trying to avoid creating lots of "bash -l" instances.

>>Does anyone know what I can do to get bash to respond promptly? Or will
>>this approach not work with bash?
> 
> It might not be bash's fault, but a general limitation of how cygwin
> handles pipes from non-cygwin processes.  A simple test case is a
> necessity if you expect help debugging this.

I've been attempting to produce one. Strangely the test case works as 
expected (ie. no problem).

Also I've tried starting bash with "bash -l" and "bash -li". Strangely
the latter does worse than the former - all the commands execute on exit.

Also starting to strace bash.

>>GNU bash, version 3.00.16(14)-release (i686-pc-cygwin)
> 
> What about upgrading to bash 3.1, now that bash-3.1-5 is the current version?

I've upgraded to 3.1-5. Behaviour is unchanged.

Given that my testcase doesn't exhibit the problem, I'll slowly keep 
adding things until it does break. Then I'll have to figure how to make 
it minimal. *sigh*


Thanks,

Dave.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019