[systemd-devel] [PATCH 3/4] Adding halt binary to shutdown the system
lennart at poettering.net
Tue Oct 5 13:50:33 PDT 2010
On Tue, 05.10.10 18:25, Michael Biebl (mbiebl at gmail.com) wrote:
> 2010/10/5 <fidencio at profusion.mobi>:
> > From: Fabiano Fidencio <fidencio at profusion.mobi>
> > This functions are working as follows:
> > - Send a SIGTERM to all processes that may be finished.
> > - Send a SIGKILL to all processes that still live and
> > may be finished.
> > - Try to mount all mount points
> ^ unmount, I guess
> > - Try to remount read-only all mount points that can't
> > be umounted
> > - Umount all swap devices.
> > - Call [poweroff|halt|reboot|kexec]
> Just to be sure:
> There still will be a separate killall service and unmounting in halt
> is only a last resort, i.e.
> mount points handled by systemd should already be unmounted when this
> binary is called?
Yes and no.
The normal service handling should make sure that normal services should
not be around anymore when this code is invoked. However, there's stuff
that's not exactly "normal services". Most prominently user sessions. To
cover those I plan to add a service that kills all user sessions on
shutdown very early, i.e. before we kill all the services. That's
something that has been missing in sysv for quite a while and we now can
add that here for the first time.
And then there's everything that moves itself to a different cgroup in
the systemd hierarchy. Which privileged code might do.
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel