29 ms·
> What about shell traversal? > [..] For example, if the CWD is “/foo/bar”, and a user calls “cd ..”, then the underlying call may be transformed into “chdir /f
by infinity0 8y ago
> What about shell traversal?
> [..] For example, if the CWD is “/foo/bar”, and a user calls “cd ..”, then the underlying call may be transformed into “chdir /foo/bar/..”, which can be canonicalized to “/foo”.
So fuchsia also won't have CWD, then? Because if it has CWD, then the process can always chdir / rendering this lack-of-.. exercise pointless.
- IshKebab 8y agoI don't see what made you think it won't have a CWD.
- rictic 8y agofuchsia is not posix, so they can (and I suspect have) change the semantics of chdir to be more restrictive.
- bun_at_work 8y agoI think the idea in Fuchsia is that directories can be passed as resources to children processes, which can then move freely around in that directory structure. If the parent passes a child "/foo/bar/", the child sees "bar/" and it's contents, which might be "bar/baz/bingo/". The child can then move to "/bar/baz/bingo/" do work there, and then recurse up the hierarchy. It simply cannot ".." out of "foo/". Hope that makes sense.