You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by sf...@apache.org on 2012/05/19 00:25:31 UTC
svn commit: r1340289 - in /apr/apr/branches/1.5.x: ./ build/mkdir.sh
Author: sf
Date: Fri May 18 22:25:31 2012
New Revision: 1340289
URL: http://svn.apache.org/viewvc?rev=1340289&view=rev
Log:
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.
Modified:
apr/apr/branches/1.5.x/ (props changed)
apr/apr/branches/1.5.x/build/mkdir.sh
Propchange: apr/apr/branches/1.5.x/
------------------------------------------------------------------------------
Merged /apr/apr/trunk:r1340286
Modified: apr/apr/branches/1.5.x/build/mkdir.sh
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/build/mkdir.sh?rev=1340289&r1=1340288&r2=1340289&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/build/mkdir.sh (original)
+++ apr/apr/branches/1.5.x/build/mkdir.sh Fri May 18 22:25:31 2012
@@ -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