diff --git a/udev_monitor.c b/udev_monitor.c index 3e3197a..b6ff644 100644 --- a/udev_monitor.c +++ b/udev_monitor.c @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -117,9 +118,13 @@ static void *udev_monitor_handle_event(void *ptr) struct inotify_event *event; struct epoll_event epoll[2]; char data[4096]; + sigset_t set; ssize_t len; int i; + sigfillset(&set); + pthread_sigmask(SIG_BLOCK, &set, NULL); + while (epoll_wait(udev_monitor->efd, epoll, 2, -1) != -1) { for (i = 0; i < 2; i++) { if (epoll[i].data.fd != udev_monitor->pfd[0]) {