Skip to content

Commit fe650a4

Browse files
committed
Merge branch 'PHP-5.5' of https://git.php.net/repository/php-src into PHP-5.5
# By Michael Wallner # Via Michael Wallner * 'PHP-5.5' of https://git.php.net/repository/php-src: fix bug #51076 (race condition in shtool's mkdir -p)
2 parents 0117eb7 + f32d2ac commit fe650a4

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? 2013, PHP 5.5.5
44

5+
- Buildsystem:
6+
. Fixed bug #51076 (race condition in shtool's mkdir -p implementation).
7+
(Mike, Raphael Geissert)
8+
59
- Core:
610
. Fixed bug #64979 (Wrong behavior of static variables in closure generators).
711
(Nikita)

build/shtool

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,14 @@ mkdir )
10031003
if [ ".$opt_t" = .yes ]; then
10041004
echo "mkdir $pathcomp" 1>&2
10051005
fi
1006-
mkdir $pathcomp || errstatus=$?
1006+
# See https://bugs.php.net/51076
1007+
# The fix is from Debian who have sent it
1008+
# upstream, too; but upstream seems dead.
1009+
mkdir $pathcomp || {
1010+
_errstatus=$?
1011+
[ -d "$pathcomp" ] || errstatus=${_errstatus}
1012+
unset _errstatus
1013+
}
10071014
if [ ".$opt_o" != . ]; then
10081015
if [ ".$opt_t" = .yes ]; then
10091016
echo "chown $opt_o $pathcomp" 1>&2

0 commit comments

Comments
 (0)