[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: inotify back end for tail -f on linux
From: |
Jim Meyering |
Subject: |
Re: inotify back end for tail -f on linux |
Date: |
Sun, 07 Jun 2009 10:22:13 +0200 |
Giuseppe Scrivano wrote:
> Jim Meyering <address@hidden> writes:
>
>> Actually, there may be a nice way to allow --pid=PID to
>> integrate seamlessly with inotify support.
>>
>> I think you can add an IN_DELETE_SELF inotify watch on the "/proc/PID"
>> directory. I suspect that every system with inotify support also
>> has usable /proc/PID directories. The only requirement seems to be
>> that the desired directory be readable.
>
> I tried to watch /proc/$PID using inotify-tools and a few lines program
> that I wrote ad-hoc and it seems I can't monitor /proc correctly.
> I didn't receive IN_DELETE_SELF or any other message when the $PID
> process was killed.
>
> It seems I can't use inotify in this direct way to monitor processes
> status.
Rats.
After you mentioned that, I tried
inotifywatch /proc/$pid
and
inotifywatch /proc/$pid/mem
and confirmed your finding. They don't work.
Then I read on lkml that it appears the linux kernel deliberately
does not enable inotify for /proc.
- Re: inotify back end for tail -f on linux, (continued)
- Re: inotify back end for tail -f on linux, Jim Meyering, 2009/06/11
- Re: inotify back end for tail -f on linux, Jim Meyering, 2009/06/13
- Re: inotify back end for tail -f on linux, Giuseppe Scrivano, 2009/06/14
- Re: inotify back end for tail -f on linux, Jim Meyering, 2009/06/15
- Re: inotify back end for tail -f on linux, Pádraig Brady, 2009/06/25
- Re: inotify back end for tail -f on linux, Jim Meyering, 2009/06/25
- Re: inotify back end for tail -f on linux, Pádraig Brady, 2009/06/25
- Re: inotify back end for tail -f on linux, Jim Meyering, 2009/06/25
- Re: inotify back end for tail -f on linux, Jim Meyering, 2009/06/06
- Re: inotify back end for tail -f on linux, Giuseppe Scrivano, 2009/06/06
- Re: inotify back end for tail -f on linux,
Jim Meyering <=