]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/systemctl/systemctl-switch-root.c
signal-util: make -1 termination of ignore_signals() argument list unnecessary
[thirdparty/systemd.git] / src / systemctl / systemctl-switch-root.c
index 9ed40e6ec3aa44d908a68e2de3fc67754177fe26..b8012679748230018e872d32fae8666409f1afc9 100644 (file)
@@ -60,7 +60,7 @@ int switch_root(int argc, char *argv[], void *userdata) {
 
         /* If we are slow to exit after the root switch, the new systemd instance will send us a signal to
          * terminate. Just ignore it and exit normally.  This way the unit does not end up as failed. */
-        r = ignore_signals(SIGTERM, -1);
+        r = ignore_signals(SIGTERM);
         if (r < 0)
                 log_warning_errno(r, "Failed to change disposition of SIGTERM to ignore: %m");
 
@@ -68,7 +68,7 @@ int switch_root(int argc, char *argv[], void *userdata) {
 
         r = bus_call_method(bus, bus_systemd_mgr, "SwitchRoot", &error, NULL, "ss", root, init);
         if (r < 0) {
-                (void) default_signals(SIGTERM, -1);
+                (void) default_signals(SIGTERM);
 
                 return log_error_errno(r, "Failed to switch root: %s", bus_error_message(&error, r));
         }