service restart question
mzerqung at 0pointer.de
Wed Jun 27 12:27:07 UTC 2012
On Wed, 27.06.12 13:34, Honza Horak (hhorak at redhat.com) wrote:
> On 06/26/2012 11:01 AM, Lennart Poettering wrote:
> >Also, if you use Restart=always and a service terminates during its
> >initialization phase then we don't try restarts either (well, at least
> >in theory, there might be a bug in this, too). We'd only restart it if
> >it terminates during the normal runtime.
> That sounds interesting, but I wonder how systemd can distinguish
> between initialization phase and normal runtime?
This really depends on the service type. For classic SysV services the
init phase is the time spent between where we fork the daemon off and
it forked off and returned in the parent. This is in-line with how SysV
defined init phase for daemons. For bus services this is the time
between where the service started and finished taking the name on the
bus. And then there is also a way how services can notify the init
system about completed initialization by issuing sd_notify("READY=1").
For more information see the systemd.service(5), the section about
Lennart Poettering - Red Hat, Inc.
More information about the devel