[ From Dave Tweten ]
POSIX.2 looks pretty unequivocal to me, and it agrees with you. Under the explanation of the "-p" option, it says, "Each dir operand that names an existing directory shall be ignored without error." Under the explanation of exit status zero, it says, "All the specified directories were created successfully, or the-p option was specified and all the specified directories now exist." Seems to me POSIX requires exactly the behavior you want. [ And I've made the change, which is also now compatible with 1.x - jkh ] Reviewed by: jkh Submitted by: jkh/tweten
This commit is contained in:
parent
166a740171
commit
cd27908e60
@ -104,8 +104,10 @@ main(argc, argv)
|
||||
}
|
||||
if (mkdir(*argv, oct ?
|
||||
omode : getmode(set, S_IRWXU | S_IRWXG | S_IRWXO)) < 0) {
|
||||
warn("%s", *argv);
|
||||
exitval = 1;
|
||||
if (!pflag) {
|
||||
warn("%s", *argv);
|
||||
exitval = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
exit(exitval);
|
||||
|
Loading…
Reference in New Issue
Block a user