diff options
author | sf <sf@13f79535-47bb-0310-9956-ffa450edef68> | 2012-05-18 22:26:34 +0000 |
---|---|---|
committer | sf <sf@13f79535-47bb-0310-9956-ffa450edef68> | 2012-05-18 22:26:34 +0000 |
commit | 505cf2d243fa01a92ec2f7b69e57473eb659b05a (patch) | |
tree | f35f6595c173f5e9adbe9cff2dcdd7a8d8b2a6b7 /build/mkdir.sh | |
parent | 0ec60a8a5870fb7760c7ac2982954b590f950590 (diff) | |
download | libapr-505cf2d243fa01a92ec2f7b69e57473eb659b05a.tar.gz |
Merge r1340286:
Make mkdir.sh save to use in parallel builds:
Don't fail if a formerly missing directory has been created by another process
in the meantime.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@1340290 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build/mkdir.sh')
-rwxr-xr-x | build/mkdir.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/build/mkdir.sh b/build/mkdir.sh index b947c9260..c59f03e18 100755 --- a/build/mkdir.sh +++ b/build/mkdir.sh @@ -28,7 +28,13 @@ for file in ${1+"$@"} ; do esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" 1>&2 - mkdir "$pathcomp" || errstatus=$? + thiserrstatus=0 + mkdir "$pathcomp" || thiserrstatus=$? + # ignore errors due to races if a parallel mkdir.sh already + # created the dir + if test $thiserrstatus != 0 && test ! -d "$pathcomp" ; then + errstatus=$thiserrstatus + fi fi pathcomp="$pathcomp/" done |