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. > also important session support: > - inform LibreOffice that the session is about to end. That pretty much exists already, search for e.g. SaveYourself in vcl/unx where the SessionManagement stuff is implemented to get the logging-out info etc. C. _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice