News for hackers. Stuff that matters.
Re:Understanding /proc by yrro on Wednesday October 05, 2016 @01:22PM (#12645822)
Huh. Does this mean that I can open() all the numerically-named directories in /proc, in a loop, and eventually prevent the system from being able to create new processes?

Or will operations on a file descriptor corresponding to an exited process fail?

Re:Understanding /proc by dezgeg on Wednesday October 05, 2016 @06:56PM (#12648674)
According to my reading of the code, an open process file just holds a reference to a relatively lightweight handle to that process (struct pid), which means 1) resource exhaustion by holding onto full process structures doesn't happen 2) numerical process ids can get recycled even if someone is holding a long-dead /proc/PID directory open for that pid, but the old opened directory keeps referring to the dead process.
Re:Understanding /proc by yrro on Friday October 07, 2016 @01:12PM (#12662254)
Thank you so much for working that out!