1 |
On 10/06/13 00:38, Greg Turner wrote: |
2 |
> On Sat, Oct 5, 2013 at 4:32 PM, Greg Turner <gmt@×××××.us> wrote: |
3 |
>> Trust me, at the end of the day, it's a cygwin bug. Technically |
4 |
>> speaking, Cygwin supports bidi pipes with the same semantics as Linux, |
5 |
>> but the implementation is broken. IIRC, something as simple as "diff |
6 |
>> -u <(echo 1) <(echo 2)" in cygwin bash is enough to confirm that. |
7 |
> If I'm not mistaken, the bug has to do with getting the handles of |
8 |
> named pipes cloned during fork(). They are supposed to stay attached, |
9 |
> of course, but instead they insta-close on read... something like that |
10 |
> anyhow, it was a while ago I looked into it :) |
11 |
> |
12 |
|
13 |
From what I can see it's down to bi-directional read/write on a FIFO. |
14 |
|
15 |
Typically a FIFO expects a reader and a writer (it's just a filesystem |
16 |
PIPE). |
17 |
Therefore we should be using two file descriptors, one for read and one |
18 |
for write. Not one file descriptor and using read/write. That's the |
19 |
Linux'ism |
20 |
we're talking about here. |
21 |
|
22 |
Alan. |