summaryrefslogtreecommitdiff
path: root/udev/udevadm-monitor.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2009-10-31 11:53:41 +0100
committerKay Sievers <kay.sievers@vrfy.org>2009-10-31 11:53:41 +0100
commitbc3ec7bd45814a75845529fd0aca5c5a9d9f0c14 (patch)
treeaa2d20a8f74779e5a7f95bf2757fbd557883365e /udev/udevadm-monitor.c
parent88fbff03df6be4f0f71df11047d4a31daed357e4 (diff)
unblock signals we might want to handle
On Thu, Oct 29, 2009 at 19:15, Christian P. Schmidt <schmidt@digadd.de> wrote: > After the getty replaces itself with login the pam module pam_mount > calls mount. This in turn determines that the partition to be mounted is > LUKS encrypted, and calls cryptsetup. Cryptsetup receives the password, > unlocks the partition, and calls udevadm settle in order to avoid some > problems in interaction with LVM. > > udevadm settle never returns. > > The problem here is that SIGUSR1 and SIGALRM are both blocked in oldmask > already, and never reach udevadm. No care is ever taken to ensure those > signals are not blocked.
Diffstat (limited to 'udev/udevadm-monitor.c')
-rw-r--r--udev/udevadm-monitor.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/udev/udevadm-monitor.c b/udev/udevadm-monitor.c
index 90388db58e..00b130dafe 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) {