summaryrefslogtreecommitdiff
path: root/udev/test-udev.c
diff options
context:
space:
mode:
Diffstat (limited to 'udev/test-udev.c')
-rw-r--r--udev/test-udev.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/udev/test-udev.c b/udev/test-udev.c
index 0806fbf9ce..bd61aa0695 100644
--- a/udev/test-udev.c
+++ b/udev/test-udev.c
@@ -52,6 +52,7 @@ int main(int argc, char *argv[])
const char *action;
const char *subsystem;
struct sigaction act;
+ sigset_t mask;
int err = -EINVAL;
udev = udev_new();
@@ -68,6 +69,11 @@ int main(int argc, char *argv[])
sigaction(SIGALRM, &act, NULL);
sigaction(SIGINT, &act, NULL);
sigaction(SIGTERM, &act, NULL);
+ sigemptyset(&mask);
+ sigaddset(&mask, SIGALRM);
+ sigaddset(&mask, SIGINT);
+ sigaddset(&mask, SIGTERM);
+ sigprocmask(SIG_UNBLOCK, &mask, NULL);
/* trigger timeout to prevent hanging processes */
alarm(UDEV_EVENT_TIMEOUT);