On Friday 2011-12-30 01:14, Michael D. Berger wrote: > [Service] > PIDFile=/var/lock/subsys/myDaemon > Type=simple > ControlGroup=cpu:/ > ExecStart=/usr/sbin/myDaemon --daemon > #ExecStop=/bin/kill -s SIGTERM $MAINPID > >Using the service as shown, when I stop myDaemon, it gets one SIGTERM . >However, if I uncomment the ExecStop line, it gets two SIGTERMs >in rapid succession. Looks like a bug to me. What do you think?
Could be a SneakyFeatureâ„¢. I can imagine that the current avoid-fork hype has gone as far as to engulf sending the termination signals. On a more serious note, it seems documented: ExecStop= [...] All processes remaining for a service after the commands configured in this option are run are terminated according to the KillMode= setting.[...] Sounds like your standard race condition: your process just did not seem to have cleaned itself up and terminated fast enough before the remaining-process-check ran. In that regard, systemd seems right in what it does. Specifying ExecStop=kill is sooo reminiscient of code duplication from olde sysv init scripts. _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel