Re: [RFC] Null Namespaces

From: Andy Lutomirski

Date: Wed Jun 24 2026 - 19:20:41 EST


On Wed, Jun 24, 2026 at 4:06 PM Andy Lutomirski <luto@xxxxxxxxxx> wrote:
>
> On Wed, Jun 24, 2026 at 3:52 PM John Ericson <mail@xxxxxxxxxxxxxx> wrote:

> > - null current working directory: relative paths with traditional,
> > non-`*at` system calls (and `*at` ones using `AT_FDCWD`) don't work.
>
> It's perfectly valid to cd to a directory that does not belong to
> one's namespace. We have fchdir. What's wrong with letting it
> continue working?
>
> Regardless of that, the current directory either needs to be a
> directory or to be nothing at all, and if we support the latter, we
> need to figure out what /proc will show.

Thinking about this more: I think that handling CWD might actually be
a prerequisite for the series and has little to do with namespaces.
Maybe try adding, as a standalone feature, the ability to have a null
CWD. Define semantics and see what the implementation looks like.

Then, if you add null namespaces, you could optionally make
transitioning to a null namespace set a null CWD. Or those features
could be orthogonal.