[systemd-devel] GuessMainPID=no required to make daemon reload work

Gerd v. Egidy lists at egidy.de
Mon May 5 01:09:12 PDT 2014


Hi Umut,

> > Can you describe the downsides of GuessMainPID=no more specific than
> > "failure detection and automatic restarting of a service will not work
> > reliably"?
> One down side I can mention is for the fault recovery. If your
> application crashes and if systemd is configured to restart it
> (Restart=), then systemd has to know which process it should watch so
> it can restart it.

Thanks to lighten things up. I haven't tried the Restart option yet, wanted to 
get the basics running first. But supporting Restart is probably a good idea 
and a good reason to get the pid stuff right.
 
> How about having 1 process as the interface to systemd and that
> process is forking it self as the "old" and "new" processes (as you
> have named)?

Yes, this would be a possibility. I already thought about this, but it adds 
some complexity to the whole setup as I'd have to rearrange the reload logic - 
the new process can't start before the old one is dead. Also I'd have to 
forward all the console output to get error messages transfered.

So this is plan B if I can't get the pid update to work.

Kind regards,

Gerd



More information about the systemd-devel mailing list