X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=udev%2Fudevadm-monitor.c;h=00b130dafea6a823183e4da61e1fe50fe3189721;hb=495d408b36718ec68ed5a3d406bc2e74b7ffc219;hp=90388db58e38c3113d67f4c5f0552e886a1656d6;hpb=fc206fbe3e326f5acfc64243f9e04eecad121e27;p=elogind.git diff --git a/udev/udevadm-monitor.c b/udev/udevadm-monitor.c index 90388db58..00b130daf 100644 --- a/udev/udevadm-monitor.c +++ b/udev/udevadm-monitor.c @@ -67,6 +67,7 @@ static void print_device(struct udev_device *device, const char *source, int pro int udevadm_monitor(struct udev *udev, int argc, char *argv[]) { struct sigaction act; + sigset_t mask; int option; int prop = 0; int print_kernel = 0; @@ -142,6 +143,10 @@ int udevadm_monitor(struct udev *udev, int argc, char *argv[]) act.sa_flags = SA_RESTART; sigaction(SIGINT, &act, NULL); sigaction(SIGTERM, &act, NULL); + sigemptyset(&mask); + sigaddset(&mask, SIGINT); + sigaddset(&mask, SIGTERM); + sigprocmask(SIG_UNBLOCK, &mask, NULL); printf("monitor will print the received events for:\n"); if (print_udev) {