Fix unlikely race (or crawl?) condition in case going from alarm to ioctl takes more than 1 second
This commit is contained in:
parent
90285c46a2
commit
330374be9e
@ -96,6 +96,7 @@ void closefd(fd_t *fdp)
|
|||||||
static void timeout(int signum)
|
static void timeout(int signum)
|
||||||
{
|
{
|
||||||
/* nothing to do, ioctl will be aborted automatically */
|
/* 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)
|
int opendev(network_t *np, fdtype_t fdtype, int compete)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user