[Libreoffice] About fd and session ends.

Stef Bon stefbon at gmail.com
Mon Jun 13 05:05:11 PDT 2011


Hi,

as developer of a construction to provide another environment, which
looks a lot like GoboLInux. The environmenty created is totally
different from the standard Linux, The root looks like:


/Computer
/Home
/Internet Services
/Network
/Mounts
/Shared
/System

Look for more information:

http://linux.bononline.nl/wiki/index.php/Mount.md5key


I'm working on the "safe remove" of a removable device like a USB stick.
Now there are two ways to pull out the device:

a. the blunt way, just by pulling it out, while apps like writer still
has a file open on it. I tried it out by just removing the file while
editing it with writer. Writer reacts when saving the file, the file
has been changed in the meantime. This is not correct, writer should
report it has being removed.

When totally removing the directory the file is in while editing it in
writer, Writer detects this by disabling the "Save" option in the
menu. This is the right reaction.

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.

Does anyone knows a way to inform an app for this purpose, and if so,
do you think it's a good idea to add this sort of functionality to
LibreOffice:

- inform LibreOffice from the system that a filesystem and anything on
it is unmounted.

also important session support:

- inform LibreOffice that the session is about to end.

Stef


More information about the LibreOffice mailing list