chiark / gitweb /
machinectl: minor simplification
authorLennart Poettering <lennart@poettering.net>
Thu, 22 Jan 2015 16:30:58 +0000 (17:30 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 22 Jan 2015 16:50:50 +0000 (17:50 +0100)
src/machine/machinectl.c

index ec403e8f33482df5404d2dde1a6af6ead2e10cef..8e2780e9c81fae97e35e3e07d9cec2a46a1db4bd 100644 (file)
@@ -1355,7 +1355,6 @@ static int login_machine(int argc, char *argv[], void *userdata) {
         int master = -1, r, ret = 0;
         sd_bus *bus = userdata;
         const char *pty, *match;
-        sigset_t mask;
         char last_char = 0;
         bool machine_died;
 
@@ -1417,9 +1416,7 @@ static int login_machine(int argc, char *argv[], void *userdata) {
         if (r < 0)
                 return bus_log_parse_error(r);
 
-        assert_se(sigemptyset(&mask) == 0);
-        sigset_add_many(&mask, SIGWINCH, SIGTERM, SIGINT, -1);
-        assert_se(sigprocmask(SIG_BLOCK, &mask, NULL) == 0);
+        sigprocmask_many(SIG_BLOCK, SIGWINCH, SIGTERM, SIGINT, -1);
 
         log_info("Connected to machine %s. Press ^] three times within 1s to exit session.", argv[1]);