lkml.org 
[lkml]   [2005]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: inotify and IN_UNMOUNT-events
Date
On Aug 30, 2005, at 23:33:27, Robert Love wrote:
> On Tue, 2005-08-30 at 21:46 +0200, Juergen Quade wrote:
>
>> Playing around with inotify I have some problems
>> to generate/receive IN_UNMOUNT-events (using
>> a self written application and inotify_utils-0.25;
>> kernel 2.6.13).
>>
>> Doing:
>> - mount /dev/hda1 /mnt
>> - add a watch to the path /mnt/ ("./inotify_test /mnt")
>> - umount /mnt
>>
>> results in two events:
>> 1. IN_DELETE_SELF (mask=0x0400)
>> 2. IN_IGNORED (mask=0x8000)
>>
>> Any ideas?
>
> "/mnt" is not unmounted, stuff inside of it is.
>
> Watch, say, "/mnt/foo/bar" and when /dev/hda1 is unmounted, you
> will get
> an IN_UNMOUNT on the watch.

I think this might work as well:
# mount /dev/hda1 /mnt
# ./inotify_test /mnt/. &
# umount /mnt

That should get the effect you are looking for

Cheers,
Kyle Moffett

--
I have yet to see any problem, however complicated, which, when you
looked at
it in the right way, did not become still more complicated.
-- Poul Anderson



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-08-31 05:47    [W:0.051 / U:10.420 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site