Further cleanup, move signal setup to a file of its own.

finit.c:
        o Perform signal setup as soon as possible, no need to do any
          mounting of /proc or /sys beforehand
        o Move signal setup and callbacks to a file of its own
        o Use more #defines for hard coded strings
        o Use a more neutral default hostname

signal.c:
        o New file, for setup and signal handlers
        o Add support for SIGSTOP/SIGSTP and SIGCONT.  This pauses finit
          respawning of xinit/shell.  Useful for, e.g., debugging
        o Document each ignored and handled signal better
        o Disable SIGUSR1 and SIGUSR2 for now, will be reenabled later

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2012-09-17 10:41:18 +02:00
1 parent 4657d9713a
commit b0aec188bc
5 files changed
+222 -130

No files matched your search

+2 -2
View File
@@ -72,10 +72,10 @@ void listen_initctl(void)
if (request.cmd == INIT_CMD_RUNLVL) {
switch (request.runlevel) {
case '0':
shutdown_handler(SIGUSR2);
do_shutdown(SIGUSR2);
break;
case '6':
shutdown_handler(SIGUSR1);
do_shutdown(SIGUSR1);
}
}
}