Support for setting PIDFile for "forking" daemons

Bug #1822337 reported by Ian Johnson
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
snapd
Triaged
Wishlist
Unassigned

Bug Description

The man page for systemd's service unit says that if the service is set with `Type=forking`, then the service unit should also specify a PID file with the `PIDFile` specification.

Currently in snaps, you can declare an app as a forking daemon with `daemon: forking` in the snap{,craft}.yaml, but you cannot specify the PIDFile for that daemon as is recommended in the man page. See:

           If set to forking, it is expected that the process configured with ExecStart= will
           call fork() as part of its start-up. The parent process is expected to exit when
           start-up is complete and all communication channels are set up. The child continues to
           run as the main daemon process. This is the behavior of traditional UNIX daemons. If
           this setting is used, it is recommended to also use the PIDFile= option, so that
           systemd can identify the main process of the daemon. systemd will proceed with
           starting follow-up units as soon as the parent process exits.

from http://manpages.ubuntu.com/manpages/bionic/man5/systemd.service.5.html

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

This is a reasonable claim: I'm marking it as a whishlist because it is a new feature.

Changed in snapd:
status: New → Triaged
importance: Undecided → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.