initscript: Do I have to wait for a service to stop?

Simo Sorce ssorce at redhat.com
Mon Jan 17 22:11:10 UTC 2011


On Mon, 17 Jan 2011 21:54:18 +0100
Lennart Poettering <mzerqung at 0pointer.de> wrote:

> On Mon, 17.01.11 14:31, Petr Pisar (ppisar at redhat.com) wrote:
> 
> > 
> > On 2011-01-17, Richard W.M. Jones <rjones at redhat.com> wrote:
> > >
> > > Now when you send a signal to the watchdog daemon, it can take
> > > several seconds to shut down.
> > 
> > I hope systemd and similar inits running daemons on foreground solve
> > this problem simply by waiting for the child's PID.
> 
> Yes, that's what happens in systemd. However we currently use SIGKILL
> after a timeout, if the normal kill signal (SIGTERM usually) didn't
> work. I have now added to my TODO list to make this SIGKILL step
> optional.

SIGKILLing databases and similar stuff is not a good idea indeed, they
may be committing data to disk, and you don't want to corrupt data if
it can be helped.

Simo.

-- 
Simo Sorce * Red Hat, Inc * New York


More information about the devel mailing list