[systemd-devel] Howto detect a program/service is started by systemd?
Cristian Rodríguez
crrodriguez at opensuse.org
Tue Jul 1 15:40:05 UTC 2025
On Mon, Jun 30, 2025 at 6:26 AM Stef Bon <stefbon at gmail.com> wrote:
>
> Hi,
>
> it's important for a program to detect it has been started by systemd.
No, programs should not attempt to detect if they are being run by
systemd or any other init.
programs can either behave as a traditional sysv daemon or as a "new
style" daemon as documented in man 7 daemon
may implement a flag like --systemd or more usually a --no-fork or
whatever option.
More information about the systemd-devel
mailing list