Skip to contentSkip to conversation

Does inotify work with special files such as /proc/<pid>/task/<tid>/children?

DISCUSSION Steven Stewart-Gallus 3 participants 3 messages Sep 28, 2014 – Sep 29, 2014

lore
Share & tools
lore
#0 lore raw

Hello,

I can't seem to get inotify to work with special files such as /proc/<pid>/task/<tid>/children? I just need to get a simple yes/no answer on whether it works for special files or whether I have to try a different approach.

Thank you,
Steven Stewart-Gallus

#1 lore raw
Quoted 6 lines · Steven Stewart-Gallus

Hello,

I can't seem to get inotify to work with special files such as /proc/<pid>/task/<tid>/children? I just need to get a simple yes/no answer on whether it works for special files or whether I have to try a different approach.

Simple answer: No. Slightly more expanded one: No, and it won't. Inotify does not work on procfs, sysfs, etc. Doesn't work on network filesystems either. Don't use it. It was a mistake in the first place.

#2 lore raw
Quoted 8 lines · On Mon, 29 Sep 2014 00:12:40 +0100 Al Viro <[email protected]> wrote:
Quoted 6 lines · Steven Stewart-Gallus

Hello,

I can't seem to get inotify to work with special files such as /proc/<pid>/task/<tid>/children? I just need to get a simple yes/no answer on whether it works for special files or whether I have to try a different approach.

Quoted 4 lines

Simple answer: No. Slightly more expanded one: No, and it won't. Inotify does not work on procfs, sysfs, etc. Doesn't work on network filesystems either. Don't use it. It was a mistake in the first place.

Why was inotify a mistake? Was it badly implemented, or is the whole concept of userspace being able to monitor filesystem changes basically impossible to do correctly?