/* Order things nicely. */
r = wait_for_terminate(pid, &status);
if (r < 0)
/* Order things nicely. */
r = wait_for_terminate(pid, &status);
if (r < 0)
- log_emergency_errno(-r, "Caught <%s>, waitpid() failed: %m", signal_to_string(sig));
+ log_emergency_errno(r, "Caught <%s>, waitpid() failed: %m", signal_to_string(sig));
else if (status.si_code != CLD_DUMPED)
log_emergency("Caught <%s>, core dump failed.", signal_to_string(sig));
else
else if (status.si_code != CLD_DUMPED)
log_emergency("Caught <%s>, core dump failed.", signal_to_string(sig));
else
* pictures already from initrd. */
r = reset_terminal_fd(tty_fd, false);
if (r < 0) {
* pictures already from initrd. */
r = reset_terminal_fd(tty_fd, false);
if (r < 0) {
goto fail;
}
r = manager_serialize(m, f, fds, switching_root);
if (r < 0) {
goto fail;
}
r = manager_serialize(m, f, fds, switching_root);
if (r < 0) {
nl.rlim_cur = nl.rlim_max = 64*1024;
r = setrlimit_closest(RLIMIT_NOFILE, &nl);
if (r < 0) {
nl.rlim_cur = nl.rlim_max = 64*1024;
r = setrlimit_closest(RLIMIT_NOFILE, &nl);
if (r < 0) {
return status_printf(NULL, false, false,
"\nWelcome to \x1B[%sm%s\x1B[0m!\n",
return status_printf(NULL, false, false,
"\nWelcome to \x1B[%sm%s\x1B[0m!\n",
else
log_info("RTC configured in localtime, applying delta of %i minutes to system time.", min);
} else if (!in_initrd()) {
else
log_info("RTC configured in localtime, applying delta of %i minutes to system time.", min);
} else if (!in_initrd()) {
if (arg_capability_bounding_set_drop) {
r = capability_bounding_set_drop_usermode(arg_capability_bounding_set_drop);
if (r < 0) {
if (arg_capability_bounding_set_drop) {
r = capability_bounding_set_drop_usermode(arg_capability_bounding_set_drop);
if (r < 0) {
error_message = "Failed to drop capability bounding set of usermode helpers";
goto finish;
}
r = capability_bounding_set_drop(arg_capability_bounding_set_drop, true);
if (r < 0) {
error_message = "Failed to drop capability bounding set of usermode helpers";
goto finish;
}
r = capability_bounding_set_drop(arg_capability_bounding_set_drop, true);
if (r < 0) {
if (empty_etc) {
r = unit_file_preset_all(UNIT_FILE_SYSTEM, false, NULL, UNIT_FILE_PRESET_FULL, false, NULL, 0);
if (r < 0)
if (empty_etc) {
r = unit_file_preset_all(UNIT_FILE_SYSTEM, false, NULL, UNIT_FILE_PRESET_FULL, false, NULL, 0);
if (r < 0)
/* This will close all file descriptors that were opened, but
* not claimed by any unit. */
/* This will close all file descriptors that were opened, but
* not claimed by any unit. */
/* And switch root with MS_MOVE, because we remove the old directory afterwards and detach it. */
r = switch_root(switch_root_dir, "/mnt", true, MS_MOVE);
if (r < 0)
/* And switch root with MS_MOVE, because we remove the old directory afterwards and detach it. */
r = switch_root(switch_root_dir, "/mnt", true, MS_MOVE);
if (r < 0)