Re: mount_mfs: why chdir?
[email protected] (Michael van Elst) Sun, 30 Mar 2025 18:00:54 -0000 (UTC)
| Newsgroups | gmane.os.netbsd.devel.userlevel |
|---|---|
| Organization | Serpens User Group |
| Message-ID | <[email protected]> |
[email protected] (Mouse) writes: >Perhaps, but that's equally true of every other mount operation >(except, to a partial extent, union mounts). Why would mount_mfs get >special treatment? I don't see any chdir call in, for example, >mount_ffs. mount_ffs applies the mount system call and exits. mount_mfs forks a background process that has the "memory disk" mapped and that terminates when you umount. While the chdir() isn't necessary, it avoids keeping the current directory busy. mount does a realpath() to resolve relative mount paths, not sure since when..