1 of 3

Why doesn't Linux support mmap by path?

The mmap syscall needs a fd as parameter, but when you close that fd, the mmap still alive in the process's memory address space.

So keeping a mmap doesn't need a opened fd. So why Linux only support create mmap of a file using a fd of it but not path of it? Wouldn't it be nice if we can have a mmapat syscall just like openat and execveat?