Edit report at https://bugs.php.net/bug.php?id=54205&edit=1
ID: 54205 Updated by: m...@php.net Reported by: fviard at lacie dot com Summary: race condition in shtool's mkdir -p implementation. AND shtool 2.0.8 -Status: Open +Status: Duplicate Type: Bug Package: Compile Failure Operating System: Linux PHP Version: trunk-SVN-2011-03-09 (SVN) Block user comment: N Private report: N New Comment: Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Thank you for your interest in PHP. See bug #51076 Previous Comments: ------------------------------------------------------------------------ [2011-03-09 16:23:49] fviard at lacie dot com Description: ------------ Previous bug #51076 http://bugs.php.net/bug.php?id=51076 was fixed by: svn commit r295225 ( http://svn.php.net/viewvc?view=revision&revision=295225 ) but later, commit r295230 ( http://svn.php.net/viewvc? view=revision&revision=295230) updated shtool to version 2.0.8 without backporting the previous patch. (In upstream, nothing changed regarding mkdir between 2.0.6 and 2.0.8) And so, the race condition with -j>1 is still there. (In my case, it appeared during the "make install" step processing the installation of the extensions) Error was: "mkdir: cannot create directory ... : File exists" So, the patch in r295225 should be reapplied to shtool 2.0.8. In a second time, why not replacing all the mkdir code block of shtool by something like: if opt_p = no: mkdir ... chmod ... chown ... chgrp ... ... else: mkdir -p ... chmod -R ... chown -R ... chgrp -R ... ... That would be safer I think ... ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=54205&edit=1