diff options
author | Raphael Geissert <geissert@php.net> | 2010-02-18 00:30:12 +0000 |
---|---|---|
committer | Raphael Geissert <geissert@php.net> | 2010-02-18 00:30:12 +0000 |
commit | dcfb8ee366f7993aa3c22a25ba018faa9c5f7cdc (patch) | |
tree | 511faefd0d3d6861e46bd07ce369240d9427cdec /build | |
parent | bf7de28e460534f0037cfa98421010902303987e (diff) | |
download | php-git-dcfb8ee366f7993aa3c22a25ba018faa9c5f7cdc.tar.gz |
Fix race condition in shtool's mkdir -p implementation (bug #51076)
Diffstat (limited to 'build')
-rwxr-xr-x | build/shtool | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/build/shtool b/build/shtool index 8d95db5b60..e291c5f76e 100755 --- a/build/shtool +++ b/build/shtool @@ -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 |