On 2/9/23 12:11 PM, Rob Landley wrote:

Therefore, when there is competition among many calls to coreutils
`mkdir -p`. The first instance will create the target, and the rest
instances will fail on the system call of mkdir. But since they find
the target is already created and is a directory, they will not
complain about the error system call mkdir. That is why I never see an
error similar to that of bash loadable `mkdir -p`. Is it so?

Right. That suggests a bug in the bash loadable,
as it should not fail in this case.

Which would be a question for bash's maintainer, not coreutils. :)

It's a question of how you deal with the race condition in the original
script. Do you check first, then mkdir (bash loadable), or mkdir, then
check failure (coreutils)? There's a race condition with either approach.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/


Reply via email to