3 ms·
Unix defines a Working Directory that every process has, changed with chdir(2): https://man7.org/linux/man-pages/man2/chdir.2.html https://man7.org/linux/man-pa
by semiquaver 10mo ago
Unix defines a Working Directory that every process has, changed with chdir(2): https://man7.org/linux/man-pages/man2/chdir.2.html https://man7.org/linux/man-pages/man2/chdir.2.html
- mort96 10mo agoThis doesn't technically answer the question: POSIX doesn't concern itself with the kernel interface, only with the libc. Most POSIX systems have a kernel with a syscall interface that mirrors the libc API so that these libc functions are just syscall wrappers, but nothing technically prevents the current working directory to be a purely userspace concept maintained by the libc where all relative paths passed to filesystem functions are translated into absolute paths by the libc function before being passed to the kernel via syscall. But yes, in the BSDs, Linux and Windows, the kernel has a concept of a current working directory.
- deleted 10mo ago[deleted]
- mort96 10mo agoIs this getting downvoted only because I referred to POSIX rather than UNIX? I'm more familiar with POSIX, but I'm 99% sure the UNIX standard also doesn't say anything about the kernel interface...