Removed duplicate code

This commit is contained in:
nocturn9x 2021-12-05 11:55:26 +01:00
parent 63ab7c61e4
commit c97c6678c2
1 changed files with 0 additions and 16 deletions

View File

@ -107,22 +107,6 @@ proc main(logger: Logger, mountDisks: bool = true, fstab: string = "/etc/fstab")
exec="/bin/false", supervised=true, restartOnFailure=true,
restartDelay=5, runlevel=Boot, workDir="/", kind=Simple))
startServices(logger, workers=2, level=Boot)
logger.debug("Setting up real signal handlers")
onSignal(SIGABRT, SIGALRM, SIGHUP, SIGILL, SIGKILL, SIGQUIT, SIGSTOP, SIGSEGV, SIGTSTP,
SIGTRAP, SIGPIPE, SIGUSR1, SIGUSR2, 6, SIGFPE, SIGBUS, SIGURG, SIGTERM): # 6 is SIGIOT
# Can't capture local variables because this implicitly generates
# a noconv procedure, so we use getDefaultLogger() instead. Must find
# a better solution long-term because we need the configuration from
# our own logger object (otherwise we'd always create a new one and
# never switch our logs to file once booting is completed)
getDefaultLogger().warning(&"Ignoring signal {sig} ({strsignal(sig)})") # Nim injects the variable "sig" into the scope. Gotta love those macros
onSignal(SIGCHLD):
# One of the key features of an init system is reaping child
# processes!
reapProcess(getDefaultLogger())
onSignal(SIGINT):
# Temporary
nimDExit(getDefaultLogger(), 131, emerg=true)
logger.debug("Starting main loop")
mainLoop(logger)