[Libreoffice] About fd and session ends.

Michael Meeks michael.meeks at novell.com
Mon Jun 13 06:20:34 PDT 2011


On Mon, 2011-06-13 at 14:05 +0200, Stef Bon wrote:
> 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:

	Ho hum; 

> 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.

	Patches much appreciated.

> 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.

	And of course, getting some clean notifications of file-system state
allow us to do that, perhaps we need more.

> b. the gentle way. It should be possible somehow that the system
> informs the app (here writer) that the underlying filesystem will be
> unmounted

	it is somewhat unusual for this to happen; however on Linux at least
'lsof' on the device / mount-point can tell you what processes are using
that file-system, which -should- be convert-able into some pretty user
display: "please save and close LibreOffice documents open on this
drive" (or whatever).

> 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:

	I would suspect it is quicker and easier to add it in a more generic
way that would identify apps at the OS level; then you get it for ~free
for everything else too.

	HTH,

		Michael.

-- 
 michael.meeks at novell.com  <><, Pseudo Engineer, itinerant idiot




More information about the LibreOffice mailing list