From: Erik van der Kouwe Date: Sun, 20 Jun 2010 07:30:53 +0000 (+0000) Subject: Fix unlikely race (or crawl?) condition in case going from alarm to ioctl takes more... X-Git-Tag: v3.1.8~433 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/style.css?a=commitdiff_plain;h=330374be9ede547c0ee32cda5a69fd78e1fb9c1b;p=minix.git Fix unlikely race (or crawl?) condition in case going from alarm to ioctl takes more than 1 second --- 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)