From: Ben Gras Date: Tue, 22 Jun 2010 23:23:31 +0000 (+0000) Subject: Fix unlikely race (or crawl?) condition in case going from alarm to ioctl takes more... X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zlib_tech.html?a=commitdiff_plain;h=673b26906804eeb4e4a57db2867b6d9380d62756;p=minix.git Fix unlikely race (or crawl?) condition in case going from alarm to ioctl takes more than 1 second (r7382 from trunk) --- 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)