Skip to content

Commit b157654

Browse files
committed
Merge branch 'PHP-5.5'
* PHP-5.5: fix bug #51076 (race condition in shtool's mkdir -p)
2 parents f0863fa + f32d2ac commit b157654

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

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)