From 673b26906804eeb4e4a57db2867b6d9380d62756 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Tue, 22 Jun 2010 23:23:31 +0000 Subject: [PATCH] Fix unlikely race (or crawl?) condition in case going from alarm to ioctl takes more than 1 second (r7382 from trunk) --- 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