chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
install: enable timesyncd by default
[elogind.git]
/
src
/
core
/
main.c
diff --git
a/src/core/main.c
b/src/core/main.c
index 863ba527cc9d10b174b9c21d305fdce25d72e55d..8ee12ef8fabfe49050702728da3e6b32da0eb8f7 100644
(file)
--- a/
src/core/main.c
+++ b/
src/core/main.c
@@
-1548,7
+1548,7
@@
int main(int argc, char *argv[]) {
log_info("Running with unpopulated /etc.");
} else {
_cleanup_free_ char *t = uid_to_name(getuid());
log_info("Running with unpopulated /etc.");
} else {
_cleanup_free_ char *t = uid_to_name(getuid());
- log_debug(PACKAGE_STRING " running in user mode for user "
P
ID_FMT"/%s. (" SYSTEMD_FEATURES ")",
+ log_debug(PACKAGE_STRING " running in user mode for user "
U
ID_FMT"/%s. (" SYSTEMD_FEATURES ")",
getuid(), t);
}
getuid(), t);
}
@@
-1824,7
+1824,7
@@
finish:
if (reexecute) {
const char **args;
unsigned i, args_size;
if (reexecute) {
const char **args;
unsigned i, args_size;
- sigset_t ss
, o_ss
;
+ sigset_t ss;
/* Close and disarm the watchdog, so that the new
* instance can reinitialize it, but doesn't get
/* Close and disarm the watchdog, so that the new
* instance can reinitialize it, but doesn't get
@@
-1910,8
+1910,10
@@
finish:
/* reenable any blocked signals, especially important
* if we switch from initial ramdisk to init=... */
/* reenable any blocked signals, especially important
* if we switch from initial ramdisk to init=... */
- sigemptyset(&ss);
- sigprocmask(SIG_SETMASK, &ss, &o_ss);
+ reset_all_signal_handlers();
+
+ assert_se(sigemptyset(&ss) == 0);
+ assert_se(sigprocmask(SIG_SETMASK, &ss, NULL) == 0);
if (switch_root_init) {
args[0] = switch_root_init;
if (switch_root_init) {
args[0] = switch_root_init;
@@
-1931,8
+1933,6
@@
finish:
log_error("Failed to execute /bin/sh, giving up: %m");
} else
log_warning("Failed to execute /sbin/init, giving up: %m");
log_error("Failed to execute /bin/sh, giving up: %m");
} else
log_warning("Failed to execute /sbin/init, giving up: %m");
-
- sigprocmask(SIG_SETMASK, &o_ss, NULL);
}
if (arg_serialization) {
}
if (arg_serialization) {