Re: Moving pid files from /var/run/$name.pid to /var/run/$name/$name.pid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 24/08/12 13:41, Colin Walters wrote:
On Fri, 2012-08-24 at 10:08 +0200, Hans de Goede wrote:

/var/run/$name.pid is the standard pid file location for daemons and has been so
for ages. A lot of distros depend on this, and we used to depend on it until we
moved to systemd which no longer cares about pid files.

Right, so why not just configure the daemon to stop writing the pid file
at all?

From systemd.service(5):

  PIDFile=
    Takes an absolute file name pointing to the PID file of this
    daemon. Use of this option is recommended for services where
    Type= is set to forking. systemd will read the PID of the main
    process of the daemon after start-up of the service.

If Type=forking is set and PIDFile is unset, systemd will try to guess the PID of the main daemon process. I'm not sure what the guessing strategy is but specifying the PIDFile explicitly is probably safer, particularly for daemons which spawn >1 processes.

Andy
--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux