From 330374be9ede547c0ee32cda5a69fd78e1fb9c1b Mon Sep 17 00:00:00 2001 From: Erik van der Kouwe Date: Sun, 20 Jun 2010 07:30:53 +0000 Subject: [PATCH] Fix unlikely race (or crawl?) condition in case going from alarm to ioctl takes more than 1 second --- commands/dhcpd/devices.c | 1 + 1 file changed, 1 insertion(+) diff --git a/commands/dhcpd/devices.c b/commands/dhcpd/devices.c index a0b758505..9a39177f2 100644 --- a/commands/dhcpd/devices.c +++ b/commands/dhcpd/devices.c @@ -96,6 +96,7 @@ void closefd(fd_t *fdp) static void timeout(int signum) { /* nothing to do, ioctl will be aborted automatically */ + if (alarm(1) < 0) fatal("alarm(1)"); } int opendev(network_t *np, fdtype_t fdtype, int compete) -- 2.44.0