2011/6/13 Caolán McNamara <caolanm@redhat.com>:
On Mon, 2011-06-13 at 14:05 +0200, Stef Bon wrote:
b. the gentle way. It should be possible somehow that the system
informs the app (here writer) that the underlying filesystem will be
unmounted, and the app should take the right action. I do not know
how, maybe via the fd, is there a certain call (fnctl, or somehing...)
or somethings else.
The gio api from glib2 provides a fair amount of this sort of thing,
e.g. callbacks when something is unmounted or whatever. There is one
standalone example of it in sfx2 for detecting if the unix quickstarter
is running while LibreOffice gets upgraded.
Theoretically could pull out the "standard" file open/close yadda
backend, reimplement it on top of the gio api instead, and then gio will
tell you when a volume has been unmounted, which gives some sort of
possibility to detect the situation and a basis for somehow propagating
it usefully to the top layers.
I do not know the gio api.
But the issue I'm trying to address is just before, to inform the user
just before about the filesystem a file is on is going to be
unavailable.
Another suggestion done here by someone else is to offer a message
with all the apps and related files open by them still using the fs.
Stef
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.