1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 18:53:33 +02:00

Fix race condition in shtool's mkdir -p implementation (bug #51076)

This commit is contained in:
Raphael Geissert
2010-02-18 00:30:12 +00:00
parent bf7de28e46
commit dcfb8ee366
+5 -1
View File
@@ -991,7 +991,11 @@ mkdir )
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