Redirecting bash stdin
Dave
kilroyd@googlemail.com
Sun Apr 30 15:52:00 GMT 2006
>>>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>.
Buchbinder, Barry (NIH/NIAID) [E] wrote:
> Have you tried piping into "bash -s"? Probably won't be any different
> than the other piping you've tried, but maybe it will.
I've just tried this - it doesn't affect the behaviour.
>>Eric Blake wrote:
>>> A simple test case is a necessity if you expect help debugging this.
I've finally got the test case to show the behaviour I'm seeing in my
application. Find it attached.
Instructions to reproduce
-------------------------
1. Compile the testcase as:
g++ -g -mno-cygwin -pedantic -Wall -W -o min_tc.exe min_tc.cc
2. Confirm you have Windows notepad in your path :)
which notepad
3. Identify a text file in your home directory to open. I'll use gdbtk.ini
4. Execute the 'working' case:
./min_tc notepad gdbtk.ini
- a few seconds pause while the bash login shell is starting
- notepad opens with your textfile (or a messagebox saying it can't
fnid it). You can leave this open, or close it.
- 10 second pause while the test case sleeps
- returned to your prompt
5. Execute the 'non-working' case:
./min_tc notepad \`cygpath -u gdbtk.ini\`
- a long pause (bash startup + 10s sleep)
- almost simultaneous opening of notepad and return to shell
NB In order to clearly see the difference in behaviour, it is useful
to run the command from a shell which only displays its prompt after
the command has completed. This rules out command.com and cmd.exe,
although they exhibit the same issue.
-------------
Any help figuring out what's causing the delayed execution is much
appreciated.
Thanks,
Dave.
PS now running bash 3.1-6
PPS yes, that is as minimal as I could get the test case. Apologies.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: min_tc.cc
Type: text/x-c++src
Size: 8835 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20060430/0831fa9b/attachment.bin>
-------------- next part --------------
--
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/
More information about the Cygwin
mailing list