From: Scott James Remnant Date: Tue, 22 Sep 2009 21:39:23 +0000 (-0700) Subject: util_run_program: *really* restore signal mask before executing event RUN commands X-Git-Tag: 174~760 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49c3a01d444052169363030dfd996fc7fd6a4fad;p=systemd util_run_program: *really* restore signal mask before executing event RUN commands The previous patch was almost, but not quite, correct. Rather than restoring the signal mask it actually tried to make an even more restrictive signal mask (had SIGALRM been blocked when udevd started, anyway). Fix it harder. Signed-off-by: Scott James Remnant --- diff --git a/libudev/libudev-util-private.c b/libudev/libudev-util-private.c index e0670dba..585dfc6a 100644 --- a/libudev/libudev-util-private.c +++ b/libudev/libudev-util-private.c @@ -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) {