Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

9
  • 1
    What will occur if a user (let's say root here) attempt to unlink /proc/x/fd/y? Would that cause the process to fail to write to the file descriptor, or is that an illegal operation? Commented Jul 28, 2014 at 11:11
  • @hexafraction /proc/*/fd/* are symlinks to real files, so removing them won't delete the file. I'd suggest you to experiment :) (not on production system of course!) Commented Jul 28, 2014 at 11:19
  • 1
    @MichaelHomer Perhaps you could clarify in your answer that once a file is unlinked, the process having a file descriptor pointing to it can link it again, at the same path or not. This can sometimes be useful. Commented Jul 28, 2014 at 14:08
  • @hexafraction Well, these are just representations (in the filesystem space) of process state and objects. If you remove those representations in the filesystem space, nothing should happen to the actual process - unless it (or some other process) relies on that representation being there. Not sure you can use rm incontinently inside /proc or /sys without getting told off by the system anyway. Commented Jul 28, 2014 at 17:54
  • @lgeorget How is that accomplished? Commented Jul 28, 2014 at 18:30