Re: svn: /php/php-src/ branches/PHP_5_2/build/shtool branches/PHP_5_3/build/shtool trunk/build/shtool

From: Date: Thu, 18 Feb 2010 08:31:47 +0000
Subject: Re: svn: /php/php-src/ branches/PHP_5_2/build/shtool branches/PHP_5_3/build/shtool trunk/build/shtool
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-61882@lists.php.net to get a copy of this message
If this wasn't in mainstream shtool, then report it there instead. We do NOT start patching this ourselves. --Jani On 02/18/2010 02:30 AM, Raphael Geissert wrote:
geissert                                 Thu, 18 Feb 2010 00:30:12 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=295225 Log: Fix race condition in shtool's mkdir -p implementation (bug #51076) Bug: http://bugs.php.net/51076 (Open) race condition in shtool's mkdir -p implementation Changed paths:
     U   php/php-src/branches/PHP_5_2/build/shtool
     U   php/php-src/branches/PHP_5_3/build/shtool
     U   php/php-src/trunk/build/shtool
Modified: php/php-src/branches/PHP_5_2/build/shtool =================================================================== --- php/php-src/branches/PHP_5_2/build/shtool 2010-02-18 00:10:10 UTC (rev 295224) +++ php/php-src/branches/PHP_5_2/build/shtool 2010-02-18 00:30:12 UTC (rev 295225) @@ -991,7 +991,11 @@
                      if [ ".$opt_t" = .yes ]; then
                          echo "mkdir $pathcomp" 1>&2
                      fi
-                    mkdir $pathcomp || errstatus=$?
+                    mkdir $pathcomp || {
+                        _errstatus=$?
+                        [ -d "$pathcomp" ] || errstatus=${_errstatus}
+                        unset _errstatus
+                    }
                      if [ ".$opt_o" != . ]; then
                          if [ ".$opt_t" = .yes ]; then
                              echo "chown $opt_o $pathcomp" 1>&2
Modified: php/php-src/branches/PHP_5_3/build/shtool =================================================================== --- php/php-src/branches/PHP_5_3/build/shtool 2010-02-18 00:10:10 UTC (rev 295224) +++ php/php-src/branches/PHP_5_3/build/shtool 2010-02-18 00:30:12 UTC (rev 295225) @@ -991,7 +991,11 @@
                      if [ ".$opt_t" = .yes ]; then
                          echo "mkdir $pathcomp" 1>&2
                      fi
-                    mkdir $pathcomp || errstatus=$?
+                    mkdir $pathcomp || {
+                        _errstatus=$?
+                        [ -d "$pathcomp" ] || errstatus=${_errstatus}
+                        unset _errstatus
+                    }
                      if [ ".$opt_o" != . ]; then
                          if [ ".$opt_t" = .yes ]; then
                              echo "chown $opt_o $pathcomp" 1>&2
Modified: php/php-src/trunk/build/shtool =================================================================== --- php/php-src/trunk/build/shtool 2010-02-18 00:10:10 UTC (rev 295224) +++ php/php-src/trunk/build/shtool 2010-02-18 00:30:12 UTC (rev 295225) @@ -991,7 +991,11 @@
                      if [ ".$opt_t" = .yes ]; then
                          echo "mkdir $pathcomp" 1>&2
                      fi
-                    mkdir $pathcomp || errstatus=$?
+                    mkdir $pathcomp || {
+                        _errstatus=$?
+                        [ -d "$pathcomp" ] || errstatus=${_errstatus}
+                        unset _errstatus
+                    }
                      if [ ".$opt_o" != . ]; then
                          if [ ".$opt_t" = .yes ]; then
                              echo "chown $opt_o $pathcomp" 1>&2


« previous php.cvs (#61882) next »