[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-portage-dev
Subject:    Re: [gentoo-portage-dev] blech... (multijob/multiprocessing work-around for cygwin)
From:       "Gregory M. Turner" <gmt () malth ! us>
Date:       2012-09-24 19:17:14
Message-ID: 5060B1BA.5010809 () malth ! us
[Download RAW message or body]

On 9/24/2012 9:08 AM, Zac Medico wrote:
> On 09/24/2012 03:25 AM, Gregory M. Turner wrote:
>>   multijob_finish_one() {
>>       local pid ret
>> -    read -r -u ${mj_control_fd} pid ret
>> +    multijob_assert
>> +    if this_host_is_cygwin ; then
>> +        read -r pid ret < ${mj_control_pipe}
>> +    else
>> +        read -r -u ${mj_control_fd} pid ret
>> +    fi
>>       : $(( --mj_num_jobs ))
>>       return ${ret}
>>   }
> Since you re-open the pipe for each read, there's a race condition which
> I've explained here:
>
> http://permalink.gmane.org/gmane.linux.gentoo.devel/77528

Gross, thanks for this pointer, Zac.  Plenty of solutions one could 
concoct, but no point dumping effort into this black-hole when I can 
just wait for somebody else to get fed up and fix the underlying problem 
for me :)

Guess it's back to stubs, for now.

-gmt



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic