title: How do I get the root directory of a process programmatically?
body: <p>On Linux, every process has its own root directory. For most processes, this is <code>/</code>. However, <code>chroot</code> can change that. This information is exposed via <code>/proc</code>. However, how do I find out the root directory of a process programmatically? Is there a syscall, or, libc function for it?</p>