1 |
Alan wrote: |
2 |
> - redirect_alloc_fd mj_control_fd "${pipe}" |
3 |
> + redirect_alloc_fd mj_write_fd "${pipe}" |
4 |
> + redirect_alloc_fd mj_read_fd "${pipe}" |
5 |
|
6 |
The one thing I'd be looking to verify is that there's no race where |
7 |
where the reader must block before the writer starts producing data. |
8 |
|
9 |
You could test that hypothesis by sleeping for a while right before |
10 |
the reader starts listening. |
11 |
|
12 |
If that were the case -- I kinda suspect it is -- then unfortunately, |
13 |
I think the writer has to spin, waiting for the reader to block... not |
14 |
a pretty situation, so let's hope I'm confused. |
15 |
|
16 |
-gmt |
17 |
|
18 |
On Sun, Oct 6, 2013 at 6:55 AM, Alan Hourihane <alanh@×××××××××××.uk> wrote: |
19 |
> On 10/06/13 00:52, Greg Turner wrote: |
20 |
>> |
21 |
>> On Sat, Oct 5, 2013 at 4:42 PM, Alan Hourihane <alanh@×××××××××××.uk> |
22 |
>> wrote: |
23 |
>>> |
24 |
>>> From what I can see it's down to bi-directional read/write on a FIFO. |
25 |
>>> |
26 |
>>> Typically a FIFO expects a reader and a writer (it's just a filesystem |
27 |
>>> PIPE). |
28 |
>>> Therefore we should be using two file descriptors, one for read and one |
29 |
>>> for write. Not one file descriptor and using read/write. That's the |
30 |
>>> Linux'ism |
31 |
>>> we're talking about here. |
32 |
>> |
33 |
>> Yes, ACK that entirely. However an argument could be made that |
34 |
>> because BSD, Linux, and everything else with any significant user-base |
35 |
>> have arrived at sufficiently similar non-POSIX behaviors, Gentoo's |
36 |
>> able to get away with it. The matter has been discussed, and a |
37 |
>> consensus was reached among the devs that it was an OK compromise. |
38 |
>> |
39 |
>> I think if you re-coded the multiprocessing stuff to work the same, |
40 |
>> without exploiting this platform quirk or making a big mess of the |
41 |
>> code, and posted your patches to your bug (and a separate one for |
42 |
>> portage) you could probably get your patches in. But just filing a |
43 |
>> bug and expecting someone else to fix it is probably not going to |
44 |
>> work, IMO. |
45 |
>> |
46 |
> Fixed for my OS, and it still works on Linux. |
47 |
> |
48 |
> Patches uploaded. |
49 |
> |
50 |
> Alan. |
51 |
> |