Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi Riccardo,

Riccardo Magliocchetti píše v So 16. 03. 2013 v 19:55 +0100:

attached a patch to add a switch to have libreoffice store its pid in a 
file. I need that so that when libo runs in headless mode i can have a 
supervisor process checking if libo is running and in case just restart 
it. The error handling is a bit lame, do we have an helper to create a 
file with its content with one function call somewhere? that could help 
cleaning the pidfile creation code a bit i think.

Without having read your patch too deeply, why not to use the
existing .lock file that can be found in the user configuration when LO
is running:

$ cat ~/.config/libreoffice/4-suse/.lock 
[Lockdata]
User=kendy
Host=eve
Stamp=804F9063F5450C58824E9DD1D3BB10C4
Time=Mon Mar 18 14:03:45 2013
IPCServer=true

It should be trivial to add PID=... line there, and check that one - how
does that sound?  See

desktop/source/deployment/misc/lockfile.cxx

for implementation of this mechanism.

Regards,
Kendy


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.