[RFC] add --pidfile switch to write libo pid to a file
Jan Holesovsky
kendy at suse.cz
Mon Mar 18 06:08:38 PDT 2013
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
More information about the LibreOffice
mailing list