/ proc / self如何在Linux中实现?


19

我正在修改/procLinux中的文件系统,然后遇到/proc/self,它是指向当前进程的进程目录的符号链接。我想知道它是如何实现的。一种解决方案是更改每个上下文切换上的符号链接,但这显然非常昂贵,因为它涉及磁盘访问。

Answers:



By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.