Re: How to remove a monitor before unmounting?
- From: Alexander Larsson <alexl redhat com>
- To: Joe Marcus Clarke <marcus FreeBSD org>
- Cc: nautilus-list <nautilus-list gnome org>
- Subject: Re: How to remove a monitor before unmounting?
- Date: Mon, 16 Feb 2009 11:11:27 +0100
On Mon, 2009-02-16 at 00:11 -0500, Joe Marcus Clarke wrote:
> On FreeBSD, our kernel file monitor requires that we open the
> file/directory to be monitored. This causes a problem when we try and
> unmount the file system (e.g. a USB volume). Because FAM has these file
> descriptors open, we always get a "Device busy" error. I was hoping to
> add some code to nautilus to remove the monitor from the volume before
> unmounting. However, I wasn't sure the best/right way to do it.
>
> If I add a call to nautilus_directory_remove_file_monitors() to
> nautilus-file.c:nautilus_file_unmount() will this work? Is there a
> better way to do this? Thanks.
Hmmm. The general idea is that using the gio API to unmount something
should cause the "mount-pre-unmount" signal to be emitted on the mount
object which should cause nautilus to close windows in the mount and
thus free the monitor.
I can't say i've recently verified that this is what happens, as i'm on
inotify atm and that doesn't keep the mount busy. Could you try to find
out where this chain is failing?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]