[issue1701] mkdir / returns EPERM instead of EEXIST (related to pkg_add)

Stathis Kamperis (via DragonFly issue tracker) sinknull at leaf.dragonflybsd.org
Tue Mar 23 16:16:13 PDT 2010


Stathis Kamperis <ekamperi at gmail.com> added the comment:

Hey all.

First, EPERM shouldn't be returned at all; instead EACCES should.

Second, POSIX says that the order of error detection is undefined. So, we may 
choose to check first the permissions and then if directory exists, or the other 
way around. Both are valid.

My 2 cents.

_____________________________________________________
DragonFly issue tracker <bugs at lists.dragonflybsd.org>
<http://bugs.dragonflybsd.org/issue1701>
_____________________________________________________






More information about the Bugs mailing list