summaryrefslogtreecommitdiff
path: root/libudev/libudev-private.h
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2009-09-05 17:48:23 +1000
committerKay Sievers <kay.sievers@vrfy.org>2009-09-07 12:13:50 +0200
commitd412a685736e3b3350b555f4d7d8ebfc80aa54c9 (patch)
tree6e49304c9c86a1db4711f1df8fcc4d6d4ca0344a /libudev/libudev-private.h
parent9e6273c713c5a4b4317decca33d2fba830562ff2 (diff)
util_run_program: restore signal mask before executing event RUN commands
External programs triggered by events (via RUN=) will inherit udev's signal mask, which is set to block all but SIGALRM. For most utilities, this is OK, but if we start daemons from RUN=, we run into trouble (especially as SIGCHLD is blocked). This change saves the original sigmask when udev starts, and restores it just before we exec() the external command. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'libudev/libudev-private.h')
-rw-r--r--libudev/libudev-private.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/libudev/libudev-private.h b/libudev/libudev-private.h
index b735298c67..e90c79cb3e 100644
--- a/libudev/libudev-private.h
+++ b/libudev/libudev-private.h
@@ -13,6 +13,7 @@
#define _LIBUDEV_PRIVATE_H_
#include <syslog.h>
+#include <signal.h>
#include "libudev.h"
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
@@ -214,7 +215,8 @@ int util_unlink_secure(struct udev *udev, const char *filename);
uid_t util_lookup_user(struct udev *udev, const char *user);
gid_t util_lookup_group(struct udev *udev, const char *group);
int util_run_program(struct udev *udev, const char *command, char **envp,
- char *result, size_t ressize, size_t *reslen);
+ char *result, size_t ressize, size_t *reslen,
+ const sigset_t *sigmask);
int util_resolve_subsys_kernel(struct udev *udev, const char *string,
char *result, size_t maxsize, int read_value);