]> err.no Git - systemd/commitdiff
udevadm: settle - fix timeout
authorAlan Jenkins <alan-jenkins@tuffmail.co.uk>
Wed, 20 May 2009 14:12:22 +0000 (16:12 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Wed, 20 May 2009 14:12:22 +0000 (16:12 +0200)
The timeout wasn't working when settle was run as root:
  # udevadm control --stop-exec-queue
  # udevadm trigger
  # udevadm settle --timeout=1
  ... (hangs)

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
udev/udevadm-settle.c

index 3b26f10d5035f815148118e1db36d93637d49d34..52d9c0b2446f03eaba816904179341d653be8116 100644 (file)
@@ -167,6 +167,7 @@ int udevadm_settle(struct udev *udev, int argc, char *argv[])
                        sigprocmask(SIG_BLOCK, &mask, &oldmask);
                        if (udev_ctrl_send_settle(uctrl) > 0)
                                sigsuspend(&oldmask);
+                       sigprocmask(SIG_SETMASK, &oldmask, NULL);
                        udev_ctrl_unref(uctrl);
                }
        }