Subject: Re: Linux emulation and mkdir with trailing /
To: None <abs@purplei.com>
From: Warner Losh <imp@village.org>
List: tech-kern
Date: 09/17/2000 18:50:15
In message <Pine.NEB.4.21.0009162028420.274-100000@odysseus.mono.org> abs@purplei.com writes:
: I have a linux binary here which calls the mkdir system call with
: a trailing /
It should ENOENT if the directory doesn't exist and EEXIST if it does.
Why? If the directory doesn't exist for "/foo/bar/", then /foo/bar
won't exist, and return the error. If it does, then "/foo/bar/."
exists. I believe that the standard states that null path components
are treated as '.'. I don't have the standards docs handy, but recall
this from past discussions on related topics.
Warner