[systemd-devel] Question about ExecStartPost= and startup process

Andrei Borzenkov arvidjaar at gmail.com
Sun Jun 28 10:35:01 PDT 2015


В Sun, 28 Jun 2015 19:02:57 +0200
Francis Moreau <francis.moro at gmail.com> пишет:

> On 06/28/2015 01:01 PM, Reindl Harald wrote:
> > 
> > 
> > Am 28.06.2015 um 12:00 schrieb Francis Moreau:
> >> Hello,
> >>
> >> For services with Type=Forking, I'm wondering if systemd  proceeds
> >> starting follow-up units when the command described by ExecStart= exits
> >> or when the one described by ExecStartPost= exits ?
> >>
> >> I tried to read the source code to figure this out and it *seems* that
> >> the latter is true but I'm really not sure.
> > 
> > after ExecStartPost because anything else would make no sense, a unit is 
> > started when *all* if is st started - see the recent mariadb units on 
> > Fedora - if systemd would fire up deaemons which depend on mariadb the 
> > whole "wait-ready"-stuff won't work
> > 
> 
> Ok, then the next naive question would be: "then what the purpose of the
> ExecStartPost= directive since several commands can already be 'queued'
> with the ExecStart= one ?
> 

Long running services (i.e. daemons) are represented by systemd with
PID of main process (which is *the* service for systemd). With multiple
ExecStart commands there is no obvious way to know which of started
processes is the main one. That's the reason to allow just one command
there. Once main process is known, it is possible to have any number of
followup ExecStartPost commands.


More information about the systemd-devel mailing list