[EMAIL PROTECTED] (David Feuer) writes: > I am working on rewriting mkdir to do smarter fchdir optimization when > multiple directories are being created.
I assume you're starting from the CVS version of coreutils? (Just as a warning: the code has changed lately.) > umask 2 > mkdir -m a+w -p foo/bar foo (does foo absolutely need to be created > with permissions according to the umask, or is it acceptable to create > it with permissions according to the -m argument?) POSIX requires the former. See <http://www.opengroup.org/onlinepubs/000095399/utilities/mkdir.html>. > mkdir /a > ln -s /a/c /a/b (note that this creates a symbolic link into the > void) > mkdir /a/c /a/b/x (can this be allowed to fail with an error?) POSIX requires that the directories must be created in the order specified, so I'd say that the last command would have to succeed (unless I'm missing the point somehow). > Would a new implementation of mkdir have to behave exactly like the > current one in such cases, or is the implementation allowed some > latitude in dealing with them? There is some latitude, yes. However, we'd prefer to continue to conform to POSIX unless there's a good reason to depart from it. _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
