X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fmain.c;h=1d188e0bfe349a4b35952b38e80bdb0ef2af894e;hb=6fa4853328e3d78d092172fa54effb7e785d0a85;hp=2bd1efd5d02202362cd6bd90c4fccc038e64f1c5;hpb=11ddb6f48e367ae4b51c31d199b28f5be041a301;p=elogind.git diff --git a/src/core/main.c b/src/core/main.c index 2bd1efd5d..1d188e0bf 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -1345,10 +1345,10 @@ int main(int argc, char *argv[]) { */ hwclock_reset_timezone(); - /* Tell the kernel our time zone */ + /* Tell the kernel our timezone */ r = hwclock_set_timezone(NULL); if (r < 0) - log_error("Failed to set the kernel's time zone, ignoring: %s", strerror(-r)); + log_error("Failed to set the kernel's timezone, ignoring: %s", strerror(-r)); } } @@ -1613,7 +1613,7 @@ int main(int argc, char *argv[]) { if (arg_running_as == SYSTEMD_SYSTEM) bump_rlimit_nofile(&saved_rlimit_nofile); - r = manager_new(arg_running_as, &m); + r = manager_new(arg_running_as, !!serialization, &m); if (r < 0) { log_error("Failed to allocate manager object: %s", strerror(-r)); goto finish; @@ -1942,6 +1942,10 @@ finish: watchdog_close(true); } + /* avoid the creation of new processes forked by the kernel; at this + * point, we will not listen to the signals anyway */ + cg_uninstall_release_agent(SYSTEMD_CGROUP_CONTROLLER); + execve(SYSTEMD_SHUTDOWN_BINARY_PATH, (char **) command_line, env_block); free(env_block); log_error("Failed to execute shutdown binary, freezing: %m");