[systemd-devel] Need advice on daemon's architecture

Hoyer, Marko (ADITG/SW2) mhoyer at de.adit-jv.com
Sun Nov 3 10:18:39 PST 2013


> -----Original Message-----
> From: systemd-devel-bounces at lists.freedesktop.org [mailto:systemd-devel-
> bounces at lists.freedesktop.org] On Behalf Of Cristian Rodríguez
> Sent: Sunday, November 03, 2013 3:25 PM
> To: systemd-devel at lists.freedesktop.org
> Subject: Re: [systemd-devel] Need advice on daemon's architecture
> 
> El 03/11/13 10:42, Hoyer, Marko (ADITG/SW2) escribió:
> 
> > Isn't the classical Linux way an option to?
> > - the daemon does its initialization with the calling thread
> > - once it is done with the initialization, it forks off a process that
> > goes on with the daemons work (the main loop probably)
> > - the calling thread returns, which signals systemd that the daemon is
> > up now
> >
> > "Type=forking" must be defined in the .service to support this architecture.
> >
> > Are there any drawbacks with this solution?
> 
> Yes, having reviewed dozens of daemons for migration to systemd, I can assure
> yours will also be missing something of the required initialization sequence
> (see daemon(7) ) or doing it wrong, as the number of daemons that do this
> routines correctly is almost non-existent.
> 
> For new daemons, please use Type=notify.
> 
> 
> 
> 
> 
> --
> "Judging by their response, the meanest thing you can do to people on the
> Internet is to give them really good software for free". - Anil Dash
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Thx for the fast feedback. Good hint with the man page, I'll have a more detailed look on the page. I think when you need to stay a bit independent from systemd and don't have a dbus interface which can be used for synchronization there is probably no other way then the classical one.

But in case I'm starting in such a well prepared environment like the one provided by a systemd service, I hopefully will not run into any troubles even if my daemon is "missing something of the required initialization sequence or doing it wrong" ;)

Best regards

Marko Hoyer
Software Group II (ADITG/SW2)

Tel. +49 5121 49 6948


More information about the systemd-devel mailing list