[systemd-devel] [PATCH 3/4] Adding halt binary to shutdown the system

Gustavo Sverzut Barbieri barbieri at profusion.mobi
Thu Sep 30 20:58:17 PDT 2010


On Thu, Sep 30, 2010 at 6:10 PM,  <fidencio at profusion.mobi> wrote:
> From: Fabiano Fidencio <fidencio at profusion.mobi>
>
> This functions are working as follows:
>    - Send a SIGTERM to all process
>    - Send a SIGKILL to all process
>    - Try to umount all mount points
>    - Try to remount read-only all mount points that can't
>    be umounted
>    - Call shutdown
>
>    If one step fail, shutdown will be aborted

Fidencio just tested this standalone, and I went into a crashed
systemd setup that made me unable to fix it, but maybe we need to
reset signal handlers to not suffer from kill(-1, SIGXYZ).

Anyway, if you have some ideas about the design, other than minor
details to make it work being execv() from main.c if (getpid() == 1)
(in the place of freeze()).


-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--------------------------------------
MSN: barbieri at gmail.com
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202


More information about the systemd-devel mailing list