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: [Bug] Named Pipes (FIFO) / Bash


Achim Gratz writes:
> I'm having problems with some bash scripts that were developed (not be
> me) and working OK in Cygwin 1.6.x versions, but not in 1.7.x (tested on
> 1.7.6, 1.7.7 and the latest snapshot).  After some gnashing of teeth and
> pulling of hair I've whittled it down to a problem with named pipe
> handling in bash.  Sifting through the archives of the mailing lists
> didn't provide much clues.  I realize from earlier discussions that
> named pipes aren't fully supported, but some examples of programs and
> scripts seem to indicate that they should at least work on a basic
> level.
>
> I've tried both the current and the just announced experimental version
> of bash and both Windows7/CoreDuo and WinXP/TurionX2 (I don't think the
> dual cores have something to do with the problem, but if necessary I
> should be able to at least boot the WinXP machine with only a single
> core enabled).
>
> $ mkfifo /tmp/pipe
> $ ( sleep 10; echo -n "blafasel "; date; sleep 10; cat < /tmp/pipe )&
> $ echo -n "dingdong "; date; exec 6> /tmp/pipe; echo -n "blumblum "; date
> $ echo -n "hurrdurr " >&6; date
>
> Running this on Linux outputs as expected:
>
> dingdong Sa 22. Jan 20:41:45 CET 2011
> blafasel Sa 22. Jan 20:41:55 CET 2011
> blumblum Sa 22. Jan 20:42:05 CET 2011
> hurrdurr Sa 22. Jan 20:42:05 CET 2011
>
> On Cygwin, I get this:
>
> dingdong Sa 22. Jan 20:41:45 CET 2011
> blumblum Sa 22. Jan 20:41:45 CET 2011
> blafasel Sa 22. Jan 20:41:55 CET 2011
> cat: -: Communication error on send

Blast from the past!  I've just tested this again with Cygwin 2.0 and it
finally works correctly.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada

--
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


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