apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1340290 - in /apr/apr/branches/1.4.x: ./ build/mkdir.sh
Date Fri, 18 May 2012 22:26:35 GMT
Author: sf
Date: Fri May 18 22:26:34 2012
New Revision: 1340290

URL: http://svn.apache.org/viewvc?rev=1340290&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.4.x/   (props changed)
    apr/apr/branches/1.4.x/build/mkdir.sh

Propchange: apr/apr/branches/1.4.x/
------------------------------------------------------------------------------
  Merged /apr/apr/trunk:r1340286

Modified: apr/apr/branches/1.4.x/build/mkdir.sh
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/build/mkdir.sh?rev=1340290&r1=1340289&r2=1340290&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/build/mkdir.sh (original)
+++ apr/apr/branches/1.4.x/build/mkdir.sh Fri May 18 22:26:34 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



Mime
View raw message