[systemd-commits] 2 commits - src/core src/libsystemd-network
Lennart Poettering
lennart at kemper.freedesktop.org
Fri Jun 20 10:33:30 PDT 2014
src/core/main.c | 10 +++++-----
src/libsystemd-network/sd-dhcp-server.c | 3 ---
2 files changed, 5 insertions(+), 8 deletions(-)
New commits:
commit 88675ae97c62dcef32c654038a9bb92fd890e408
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date: Fri Jun 20 19:32:51 2014 +0200
sd-dhcp-server: remove unused cleanup function
Removes _cleanup_dhcp_lease_free_. While the automatic cleanup
functions are great to have this one is never used and causes
a warning in clang.
diff --git a/src/libsystemd-network/sd-dhcp-server.c b/src/libsystemd-network/sd-dhcp-server.c
index 5bdcf86..e4236e8 100644
--- a/src/libsystemd-network/sd-dhcp-server.c
+++ b/src/libsystemd-network/sd-dhcp-server.c
@@ -105,9 +105,6 @@ static void dhcp_lease_free(DHCPLease *lease) {
free(lease);
}
-DEFINE_TRIVIAL_CLEANUP_FUNC(DHCPLease*, dhcp_lease_free);
-#define _cleanup_dhcp_lease_free_ _cleanup_(dhcp_lease_freep)
-
sd_dhcp_server *sd_dhcp_server_unref(sd_dhcp_server *server) {
DHCPLease *lease;
commit 9bfcda9528636914aef3e0ab91191bb81654c83d
Author: Lennart Poettering <lennart at poettering.net>
Date: Fri Jun 20 16:58:21 2014 +0200
core: clean-up signal reset logic when reexec
There's no need to save the old sigmask, if we are going to die. Let's
simplify this. Also, reset all the signal handlers, so that we don't
leave SIG_IGN set for some of them across reexec.
diff --git a/src/core/main.c b/src/core/main.c
index 863ba52..6981e72 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -1824,7 +1824,7 @@ finish:
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
@@ -1910,8 +1910,10 @@ finish:
/* 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;
@@ -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");
-
- sigprocmask(SIG_SETMASK, &o_ss, NULL);
}
if (arg_serialization) {
More information about the systemd-commits
mailing list