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

2013-11-04 Thread Lennart Poettering
On Sun, 03.11.13 10:40, Peter Lemenkov (lemen...@gmail.com) wrote: Hello All! I'm working on a system service which uses systemd intensively. Right now it's socket-activated, with main service of type simple. I recently added support for querying and publishing some internals via D-Bus, so

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

2013-11-04 Thread Lennart Poettering
On Sun, 03.11.13 13:42, Hoyer, Marko (ADITG/SW2) (mho...@de.adit-jv.com) wrote: If you are using systemd intensively, then you may want to use Type=notify. With type=dbus, systemd will consider things ready when you take the name on the bus, but this might not actually be the last thing

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

2013-11-04 Thread Simon McVittie
On 04/11/13 14:42, Lennart Poettering wrote: A lot of (library) code is not happy with being initialized in one process and being used in another forked off one. For what it's worth, fork(3posix) also notes this: * A process shall be created with a single thread. If a multi-threaded process

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

2013-11-04 Thread Colin Walters
On Mon, 2013-11-04 at 14:57 +, Simon McVittie wrote: See Linux signal(7) for a list of async-signal-safe operations: it's not as long a list as you might hope, and mostly contains syscalls. In particular, malloc() is not on the list, which rules out a lot of library code... Given however

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

2013-11-04 Thread Hoyer, Marko (ADITG/SW2)
-Original Message- From: Lennart Poettering [mailto:lenn...@poettering.net] Sent: Monday, November 04, 2013 3:42 PM To: Hoyer, Marko (ADITG/SW2) Cc: Colin Guthrie; Peter Lemenkov; systemd-devel@lists.freedesktop.org Subject: Re: [systemd-devel] Need advice on daemon's architecture

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

2013-11-03 Thread Peter Lemenkov
Hello All! I'm working on a system service which uses systemd intensively. Right now it's socket-activated, with main service of type simple. I recently added support for querying and publishing some internals via D-Bus, so it has a D-Bus name now. Does it add anything if I change type of a main

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

2013-11-03 Thread David Strauss
On Sat, Nov 2, 2013 at 11:40 PM, Peter Lemenkov lemen...@gmail.com wrote: Does it add anything if I change type of a main service to dbus thus allowing systemd to know for sure if my service is fully initialized? Yes. Changing to Type=dbus will cause systemd to only consider the service fully

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

2013-11-03 Thread Colin Guthrie
'Twas brillig, and Peter Lemenkov at 03/11/13 06:40 did gyre and gimble: Hello All! I'm working on a system service which uses systemd intensively. Right now it's socket-activated, with main service of type simple. I recently added support for querying and publishing some internals via D-Bus,

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

2013-11-03 Thread Hoyer, Marko (ADITG/SW2)
-Original Message- From: systemd-devel-boun...@lists.freedesktop.org [mailto:systemd-devel- boun...@lists.freedesktop.org] On Behalf Of Colin Guthrie Sent: Sunday, November 03, 2013 12:54 PM To: Peter Lemenkov; systemd-devel@lists.freedesktop.org Subject: Re: [systemd-devel] Need

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

2013-11-03 Thread Jan Engelhardt
On Sunday 2013-11-03 14:42, Hoyer, Marko (ADITG/SW2) wrote: 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

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

2013-11-03 Thread Cristian Rodríguez
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

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

2013-11-03 Thread Hoyer, Marko (ADITG/SW2)
-Original Message- From: systemd-devel-boun...@lists.freedesktop.org [mailto:systemd-devel- boun...@lists.freedesktop.org] On Behalf Of Cristian Rodríguez Sent: Sunday, November 03, 2013 3:25 PM To: systemd-devel@lists.freedesktop.org Subject: Re: [systemd-devel] Need advice

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

2013-11-03 Thread Zbigniew Jędrzejewski-Szmek
On Sun, Nov 03, 2013 at 06:18:39PM +, Hoyer, Marko (ADITG/SW2) wrote: 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