Skip to contentSkip to conversation

Suggestion : /proc files

RFC In review Emmanuel Colbus 1 participant 1 message Apr 15, 2014

lore
Share & tools
lore
#0 lore raw

RFC 11/11 Suggestion : /proc files

Now, a second suggestion : in /proc, besides the pids and the /proc/self symlink, there are several files that have a length of 0 (according to stat(2)), but actually have a non-empty content. What about making these files character-mode device files? I mean, a file whose content is virtual an whose size is unknown at stat(2)-time, this seems to correspond more closely to character-mode files that to regular ones.

That's just an idea that came to me, I've not tried it myself, and perhaps there are compatibility considerations that prevent such a modification. But even if there is this problem, this doesn't precludes making any future file in this way. What do you think about it?

Anyways, that was it. Thanks for your attention, and happy hacking!

Emmanuel