This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Redirecting bash stdin


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]