1 |
On Sat, Oct 5, 2013 at 4:16 PM, Alan Hourihane <alanh@×××××××××××.uk> wrote: |
2 |
> No it's not cygwin, and as I said I already googled it. |
3 |
|
4 |
Trust me, at the end of the day, it's a cygwin bug. Technically |
5 |
speaking, Cygwin supports bidi pipes with the same semantics as Linux, |
6 |
but the implementation is broken. IIRC, something as simple as "diff |
7 |
-u <(echo 1) <(echo 2)" in cygwin bash is enough to confirm that. |
8 |
|
9 |
> But I will say the current mechanism is not POSIX compliant. Gentoo is using |
10 |
> a Linux'ism here and it's not portable. Opening a fifo in read/write mode |
11 |
> has nondeterministic behavior in POSIX. |
12 |
> |
13 |
> Should I log this as a bug ? |
14 |
|
15 |
That's an good point, and you certainly /could/ file a bug for that. |
16 |
But unless you have a POSIX compliant drop-in replacement ready to go, |
17 |
I think your bug is likely to be met with a pretty cool reception. In |
18 |
fact I'm pretty sure I already filed a bug and the response I got was |
19 |
along the lines of "add a stub implementation and a platform blacklist |
20 |
with just cygwin in it, if you like." |
21 |
|
22 |
From a theoretical perspective, I guess Gentoo has no POSIX compliance |
23 |
policy, in which case, there really is no bug to be fixed. |
24 |
|
25 |
Fixing the implementation to be truly POSIX is probably do-able. |
26 |
Fixing Cygwin's named pipe implementation also didn't look |
27 |
insurmountable. So after some quick experimentation to see if I could |
28 |
figure out a quick-and-dirty solution (I couldn't), I kind of put it |
29 |
on my long-term todo list where it's remained since. |
30 |
|
31 |
The stubs work, though, to solve the problem, at a |
32 |
tolerable-if-unfortunate cost of making cygwin portage slower. Also |
33 |
there is code in my cygwin overlay on github that, although |
34 |
theoretically not a correct solution (IIRC because it is not atomic in |
35 |
some crucial places), works pretty good. |
36 |
|
37 |
Do be sure to fix it in the portage code and in the eclass, if you are |
38 |
fixing it -- the code is almost identical, so this is easy, but unless |
39 |
you fix both, it won't help. |
40 |
|
41 |
-gmt |