Re: [Utopia] [patch] mount/unmount when starting/stopping



On Tue, 2004-08-17 at 17:02 -0400, Sean Middleditch wrote:
> On Tue, 2004-08-17 at 15:54 -0500, Jerry Haltom wrote:
> > HAL propigates EjectPressed to GVM. GVM attempts to umount the drive,
> > not lazy. If umount succeeds, device is ejected. If the umount fails,
> > because the device is in use, GVM does not eject the device. Instead,
> > broadcasts DevicePendingEject to DBUS (I just made this up). Nautilus
> > receives this signal and closes it's browser window. The text editor of
> > course can't.
> 
> The text editor should do *something* useful in this case.  If the file
> is simply open in an editor window, nothing says the text editor can't
> make sure it has the whole thing in memory (or cached to local disk) and
> release any open file descriptors on the device.  Saving the file back
> to the original media of course then is impossible, but that's no big
> surprise; in many cases, the file won't be modified anyway, and if it
> is, the user can either reinsert the media or just save the file
> elsewhere.
> 

100% Agree. However, right now, we can't guarantee it will, so GVM needs
to handle that case. In the perfect world, the text editor would receive
a signal that tells it to release the file. The text editor would then
switch the file to READ-ONLY mode, or be friendly to the user, asking
them to reinsert hte media. Mac OS did this last I checked (don't know
about OS X). It would let you open files on a floppy disk, and when you
tried to save them, it would say "Please insert disk `blah`...", and it
wouldn't let you continue until the correct disk was inserted.

I am wondering if something like this signal exists? Like, sending a
signal to a file and having all apps with a FD receive it? If not, could
such a system be built into GnomeVFS, using DBUS?






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]