diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-11-14 19:47:08 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-11-14 19:47:08 +0000 |
commit | bd14d90001a9f9274150dd6beb5235bedcd73792 (patch) | |
tree | ce49b349822c545ba741befb0b18320a0fac1302 | |
parent | 16548adc66fb6562df242b90044d56d44e3401a1 (diff) |
in poll, if fd is < 0, clear revents; bjy@mogua.org
-rw-r--r-- | sys/kern/sys_generic.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index 278ffc24d97..ea62a488a66 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_generic.c,v 1.30 2001/10/26 12:03:27 art Exp $ */ +/* $OpenBSD: sys_generic.c,v 1.31 2001/11/14 19:47:07 deraadt Exp $ */ /* $NetBSD: sys_generic.c,v 1.24 1996/03/29 00:25:32 cgd Exp $ */ /* @@ -890,6 +890,9 @@ pollscan(p, pl, nfd, retval) pl[i].revents = POLLNVAL; n++; continue; + } else if (pl[i].fd < 0) { + pl[i].revents = 0; + continue; } fp = fdp->fd_ofiles[pl[i].fd]; |