diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2009-09-05 17:48:23 +1000 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2009-09-07 12:13:50 +0200 |
commit | d412a685736e3b3350b555f4d7d8ebfc80aa54c9 (patch) | |
tree | 6e49304c9c86a1db4711f1df8fcc4d6d4ca0344a /udev/test-udev.c | |
parent | 9e6273c713c5a4b4317decca33d2fba830562ff2 (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 'udev/test-udev.c')
-rw-r--r-- | udev/test-udev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/udev/test-udev.c b/udev/test-udev.c index c6b8bf573b..0806fbf9ce 100644 --- a/udev/test-udev.c +++ b/udev/test-udev.c @@ -103,7 +103,7 @@ int main(int argc, char *argv[]) alarm(udev_device_get_event_timeout(dev)); if (err == 0 && !event->ignore_device && udev_get_run(udev)) - udev_event_execute_run(event); + udev_event_execute_run(event, NULL); udev_event_unref(event); udev_device_unref(dev); |