Commit: f32d2ac3aaa7d4af7c348b00ebebb9ae64955704 Author: Michael Wallner <m...@php.net> Tue, 8 Oct 2013 08:37:08 +0200 Parents: 0117eb747e1b36a301d58fa29aa3ae48b5aa2ac7 Branches: PHP-5.5 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f32d2ac3aaa7d4af7c348b00ebebb9ae64955704 Log: fix bug #51076 (race condition in shtool's mkdir -p) Bugs: https://bugs.php.net/51076 Changed paths: M NEWS M build/shtool Diff: diff --git a/NEWS b/NEWS index 796f82f..6649a49 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,10 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 2013, PHP 5.5.5 +- Buildsystem: + . Fixed bug #51076 (race condition in shtool's mkdir -p implementation). + (Mike, Raphael Geissert) + - Core: . Fixed bug #64979 (Wrong behavior of static variables in closure generators). (Nikita) diff --git a/build/shtool b/build/shtool index 684a01f..fc6ae1e 100755 --- a/build/shtool +++ b/build/shtool @@ -1003,7 +1003,14 @@ mkdir ) if [ ".$opt_t" = .yes ]; then echo "mkdir $pathcomp" 1>&2 fi - mkdir $pathcomp || errstatus=$? + # See https://bugs.php.net/51076 + # The fix is from Debian who have sent it + # upstream, too; but upstream seems dead. + 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 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php