On 30/07/10 08:59, Paul Eggert wrote: > I discovered a race condition in coreutils sort, when running > multithreaded, in the check_mixed_SI_IEC function. Rather than add > interlocks, I decided to address the underlying problem by fixing > coreutils to do the right thing with mixed SI and IEC prefixes (modulo > rounding errors). To do this I installed the following:
This is more general, but seems slightly overengineered given that coreutils doesn't produce mixed prefixes or non uninform abbreviations. Also it's slower and now -h can't sort numbers with thousands separators which is a common "human" format. I know we can with -n, but it's a shame to lose that with -h. Perhaps since strtold() is so heavy weight anyway, we could strip commas first? cheers, Pádraig.