Skip to main content
edited tags
Link
Gilles 'SO- stop being evil'
  • 865.5k
  • 205
  • 1.8k
  • 2.3k
Tweeted twitter.com/StackUnix/status/814179051283894272
Source Link
Tim
  • 106.8k
  • 234
  • 651
  • 1.1k

Which process is `/proc/self/` for?

https://www.centos.org/docs/5/html/5.2/Deployment_Guide/s3-proc-self.html says

The /proc/self/ directory is a link to the currently running process.

There are always multiple processes running concurrently, so which process is "the currently running process"?

Does "the currently running process" have anything to do with which process is currently running on the CPU, considering context switching?

Does "the currently running process" have nothing to do with foreground and background processes?