[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Faster shutdown and the ubuntu "multiuser" update-rc.d extention



On Thu, Jan 03, 2008 at 01:11:57PM +0100, Gabor Gombas wrote:
> On Thu, Jan 03, 2008 at 02:45:40AM +0000, Colin Watson wrote:

> > If this is a real problem for a given service, surely its init script
> > should actually wait for the process to shut down cleanly? If so, it
> > wouldn't be a candidate for this refactoring.

> IMHO there can be many init scripts that currently do not wait for the
> process to stop but they should if you want to do this refactoring. Some
> random checks:

> - samba: there is a sleep in "stop" but that may not be enough if
>   there is heavy I/O. An explicit wait for process termination should be
>   added.

The sleep is only there to try to clean up a pid file that the daemon fails
to take care of on its own.  Put /var/run on a tmpfs and it's a non-issue on
shutdown. :)

It's also, as commented already in the init script, recognized as a bug in
the associated daemon.  Fixing that bug would drop the need for the sleep,
though if there's a possibility of SIGKILL coming before the daemon is done
shutting down then you still don't have a guaranteed cleanup, and there's no
good "wait for process termination" facility that we can use from init
scripts.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek@ubuntu.com                                     vorlon@debian.org


Reply to: