chiark / gitweb /
keymap: Add Acer Aspire 1810TZ
[elogind.git] / udev / test-udev.c
index 0806fbf9ce5fb04a8b480c104b928a285c00f86e..28c833a9e5201856173f81a1ef115ca522393584 100644 (file)
@@ -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);
@@ -102,7 +108,7 @@ int main(int argc, char *argv[])
        if (udev_device_get_event_timeout(dev) >= 0)
                alarm(udev_device_get_event_timeout(dev));
 
-       if (err == 0 && !event->ignore_device && udev_get_run(udev))
+       if (err == 0)
                udev_event_execute_run(event, NULL);
 
        udev_event_unref(event);