[systemd-devel] need help implementing a special behaviour

Andrey Borzenkov arvidjaar at gmail.com
Tue Jul 8 09:03:01 PDT 2014


В Tue, 08 Jul 2014 14:37:19 +0200
Steffen Sledz <sledz at dresearch-fe.de> пишет:

> On 08.07.2014 14:22, Lennart Poettering wrote:
> > On Tue, 08.07.14 14:11, Steffen Sledz (sledz at dresearch-fe.de) wrote:
> >> There is one more open question. We did not found a *clear* definition
> >> (e.g. a state diagram) of all the states a unit can have.
> > 
> > Yeah, I tried to avoid documenting this in too much detail, since we
> > wanted to have the freedom to still alter the state machine if we need
> > to.
> > 
> >> e.g. What is the criteria for a service to change from *activating* to *active/started*?
> > 
> > That depends on the service Type= you have chosen, and whether you have
> > ExecStartPre= and/or ExecStartPost= commands for your service. "Active"
> > is entered basically after everything needed to start up a service is
> > executed plus the service has reported back that it is up. "Everything
> > needed" means ExecStartPre= and ExecStartPost= having been executed. And
> > the "reporting back" refers to the notification logic you chose with
> > Type=. See systemd.service(5) for more information about that.
> > 
> > Hope that makes some sense?
> 
> Also this manpage is not fully clear. E.g. if we have to *simple* services A and B with an After= between them.
> 
> What is the criteria that A changes from *activating* to *active* and B can start?
> 

If there are ExecStartPost - once they finish execution. If there are
not - once program from ExecStart is launched (actually, once it is
forked - I do not see how systemd can wait until it is actually execed).


More information about the systemd-devel mailing list