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

Gerd v. Egidy lists at egidy.de
Mon May 5 01:20:15 PDT 2014


Hi Кирилл,

> I've just tested the way I described it and everything worked perfectly.

Thanks.

> What's wrong with writing the new pid from the old proccess before
> releasing the lock?

To get it right I have to take care of two cases of SIGTERM in the old daemon:

a) the new process checked it's config, everything is ok, and it sent the 
SIGTERM to the old daemon

b) the new process is still checking the config and in this moment someone else 
(like systemd) is sending a SIGTERM to the old daemon (it is still considered 
the master).

So I think I have to look who is sending the SIGTERM and act accordingly.

So unless someone else has a better idea I'll try this approach and report 
back.

Kind regards,

Gerd



More information about the systemd-devel mailing list