chiark / gitweb /
keymap: make USB keyboards really work
[elogind.git] / libudev / libudev-util-private.c
index fb64c13229cfdb384c84ff8d51e4bdbd3bff2c0f..585dfc6a41004f08f5fe1dfd6b4a37760d702af1 100644 (file)
@@ -251,7 +251,7 @@ int util_run_program(struct udev *udev, const char *command, char **envp,
        pid_t pid;
        char arg[UTIL_PATH_SIZE];
        char program[UTIL_PATH_SIZE];
-       char *argv[(sizeof(arg) / 2) + 1];
+       char *argv[((sizeof(arg) + 1) / 2) + 1];
        int devnull;
        int i;
        int err = 0;
@@ -337,7 +337,7 @@ int util_run_program(struct udev *udev, const char *command, char **envp,
                }
 
                if (sigmask)
-                       sigprocmask(SIG_BLOCK, sigmask, NULL);
+                       sigprocmask(SIG_SETMASK, sigmask, NULL);
 
                execve(argv[0], argv, envp);
                if (errno == ENOENT || errno == ENOTDIR) {