[RFC] add --pidfile switch to write libo pid to a file
Stephan Bergmann
sbergman at redhat.com
Mon Mar 18 14:18:42 PDT 2013
On 03/16/2013 07:55 PM, Riccardo Magliocchetti wrote:
> 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.
I'm not sure how exactly you would want to use this (e.g., given that
there's only code to create the pid file, but none to clear it again),
but have a few points:
* If you have a supervisor process, why not let it keep track of the pid
of any started LO process?
* The client-facing executable in LO is soffice (which on Linux is a
shell script that execs into oosplash), which internally spawns
soffice.bin processes. It would thus look more natural to be interested
in pid files from the client-facing process rather than from soffice.bin
processes (which your patch would implement).
* I would prefer if we could get away without exposing that
OSL_DETAIL_GETPID hack in the stable URE interface. For example, its
underspecified type is not a problem for the sole use case in
sal/osl/all/log.cxx, but would not fit well into a well-crafted API.
Stephan
More information about the LibreOffice
mailing list