Here's how to reproduce it: 1. set up /etc/locale.gen to generate 2 locales. 2. as root run bash -vx /usr/sbin/locale-gen -j 5 &> locale-gen.log Now search the logfile backward for 'wait'. You will find a wait without arguments. So status info for the 2 jobs that run localedef in the background is lost!
Created attachment 140093 [details, diff] patch for reported problem After patching locale-gen and running the commands again you will find 2 waits for specific pids, and the status information for both subprocesses is handled correctly.
Comment on attachment 140093 [details, diff] patch for reported problem that isnt a patch ...
Created attachment 140127 [details, diff] Patch for the problem Sorry. Here's the patch.
Created attachment 140185 [details, diff] The final patch
Created attachment 140186 [details] More details
Comment on attachment 140186 [details] More details ><HTML><HEAD/><BODY><PRE>Here's some more info: > >On entering the codeblock at line 349, the situation is as follows: > >All requested locale generations have been launched in background. At >most min(JOBS_MAX, JOB_COUNT) are either still running in the >background or have finished running in the background but have >not been waited upon to check their terminating status. > > JOB_IDX = ((cnt mod JOBS_MAX)) > >where cnt is total number of locations to generate. > >There are 2 possibilities: > >case > cnt >= JOBS_MAX > we must wait on every job in the JOBS array, starting with the > oldest entry and working are way back to the youngest. > That is, starting from JOB_IDX and working our way back in > round-robin fashion until JOB_COUNT drops to 0. > > cnt < JOBS_MAX > we should start from index 0 in the JOBS array until JOB_COUNT > drops to 0. We can revert to the above algo if we catch entries > outsid the boundary of the JOBS array. > >------------------- > >As is, I can run locale-gen from a non-root user account and it will give >me a return code of 0, though it hasn't generated a single locale, because it >doesn't have sufficient permissions. > >The problem only occurs when JOBS_MAX > 1, which is probably the reason why >the bug hasn't been reported before. > >Hope this helps... ></PRE></BODY></HTML>
i dont think your changes would have really fixed things properly ... ive committed this instead: http://sources.gentoo.org/gentoo/src/patchsets/glibc/extra/locale/locale-gen?r1=1.25&r2=1.26