The usage of the read/write fifos at the end of multiprocessing.eclass results in failure on some non-Linux OS's due to POSIX claiming the behaviour is undefined and not guaranteed. My OS fails with this usage and cannot support the behaviour currently. http://pubs.opengroup.org/onlinepubs/7908799/xsh/open.html The above document explicitly says.... O_RDWR Open for reading and writing. The result is undefined if this flag is applied to a FIFO. Any chance we can fix multiprocessing.eclass for other OS's ?
Created attachment 360230 [details, diff] multiprocessing.eclass patch Use two file descriptors for FIFO. Fixes my non-Linux OS.
Created attachment 360232 [details, diff] helper-functions.sh patch Use two file descriptors for FIFO. Fixes my non-Linux OS.
These two patches fixes the problem here, and it still works on Linux. Any chance these are o.k. to commit ? Thanks.
Oh, forgot to also mention this patch fixes the FIFO permissions to be 600.
Just to note as well, that the FIFO is still opened R/W, that's because it's the only way to get bash to do non-blocking IO. But because we have a reader and a writer on two seperate file descriptors, we end up just using a write-only and a read-only path. Which is what's desired here. Thanks.
Prefix directly gets this eclass from gx86. Helper functions is a portage bug/patch, will address it in Prefix branch now.
(In reply to Alan Hourihane from comment #0) the OS you've chosen is a pos. but POSIX does make it clear that some OS's are allowed to be moronic, and your patch doesn't look terrible. http://sources.gentoo.org/eclass/multiprocessing.eclass?r1=1.2&r2=1.3
Thanks for committing !
(In reply to SpanKY from comment #7) > (In reply to Alan Hourihane from comment #0) > > the OS you've chosen is a pos. but POSIX does make it clear that some OS's > are allowed to be moronic, and your patch doesn't look terrible. > > http://sources.gentoo.org/eclass/multiprocessing.eclass?r1=1.2&r2=1.3 Oh, Did the helpers fix get committed to portage too ? Thanks.
(In reply to Alan Hourihane from comment #9) no, but it has now: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commitdiff;h=c651476c03a67e98054335b43e476c55bcab167f
(In reply to SpanKY from comment #10) > http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commitdiff; > h=c651476c03a67e98054335b43e476c55bcab167f Functions other than makeopts_jobs() in bin/helper-functions.sh have consistently private names (with initial "__").
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #11) i'm aware. this code isn't sourced anywhere that seems to matter.