How long do the symlinks form the File Descriptors in /proc/PID/fd/ are kept?

During the complete life of the process?

What about when this is a multi-threaded process?

Do I have the guaranty that after hours of work, all files that were open during some point in time will be listed here? Currently, the links in here are all numbered from 0 to n, with no number missing in between. Can the case occur that a number is missing? Or do a file simply disappears at same point, with no indication that it was ever open?

Tnx.

link|improve this question

75% accept rate
feedback

1 Answer

They reflect the current state of the process.

link|improve this answer
This. They're not really there, in the sense that they're on the disk. The directory readout is fabricated by the kernel when you read it, on the spot, right at that moment. procfs is a virtual file system (pardon the abuse of the term). – c4757p Dec 8 '11 at 14:28
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.