-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How should ..
paths be resolved?
#26
Comments
I'd lean towards allowing it to be nondeterministic. Multiple syscalls to emulate POSIX semantics sounds slow - especially in the case of network attached storage - and perhaps inconsistently implemented as a result, even on supposedly POSIX systems (if, for example, they might be talking to non-POSIX systems over odd network mounts or similar.) |
One way out of this is to put the burden of resolving |
That would have the effect of allowing self-imposed |
WASI filesystem allows applications to voluntarily sandbox themselves by closing fds to directories they don't need, or even opening subdirectories and closing the parent fds. My sense here is that this is similar to the issues with case sensitivity. We aren't going to achieve full filesystem determinism without drastic costs. And there systems which do both eager and on-demand |
I don't think having the host resolve ".." will work. In current practice, the current working directory is tracked in guest code, not host code. Lacking any ability to hook on cd/chdir I think relative lookups must be out of scope from perspective of the host. |
On POSIX, path resolution is performed one component at a time, and
..
is resolved only after resolving all components that came before it. Opening a path such asnonexistent/..
fails, because openingnonexistent
first fails.On Windows, path resolution has an up-front parsing step which resolves
..
. Onnonexistent/..
, it's resolved to.
first, so opening it succeeds.Should we require Windows implementations to emulate POSIX semantics here, or say that whether
..
is resolved up front or on the fly is nondeterministic?The text was updated successfully, but these errors were encountered: