From: Alan Jenkins Date: Wed, 20 May 2009 14:12:22 +0000 (+0200) Subject: udevadm: settle - fix timeout X-Git-Tag: 174~1041 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f58a9099bb2b18f3f683615324a4382b95446305;p=systemd udevadm: settle - fix timeout 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 --- diff --git a/udev/udevadm-settle.c b/udev/udevadm-settle.c index 3b26f10d..52d9c0b2 100644 --- a/udev/udevadm-settle.c +++ b/udev/udevadm-settle.c @@ -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); } }