diff options
author | jhb <jhb@FreeBSD.org> | 2000-07-13 02:12:25 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2000-07-13 02:12:25 +0000 |
commit | 7b33546c33912ff990f0664070a3114966cdd4bd (patch) | |
tree | db86fff53c1630a4862ee5a4a5e16d923eeabe42 /sys/kern | |
parent | e713486f3bcd68bbd87a88159511349e9ffbaace (diff) | |
download | FreeBSD-src-7b33546c33912ff990f0664070a3114966cdd4bd.zip FreeBSD-src-7b33546c33912ff990f0664070a3114966cdd4bd.tar.gz |
For infinite timeouts, set both the tv_sec and tv_usec fields to zero in
poll() and select().
Noticed by: Wesley Morgan <morganw@chemicals.tacorp.com>
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/sys_generic.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index 6099c0b..8e1c4dc 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -694,8 +694,10 @@ select(p, uap) } getmicrouptime(&rtv); timevaladd(&atv, &rtv); - } else + } else { atv.tv_sec = 0; + atv.tv_usec = 0; + } timo = 0; retry: ncoll = nselcoll; @@ -827,8 +829,10 @@ poll(p, uap) } getmicrouptime(&rtv); timevaladd(&atv, &rtv); - } else + } else { atv.tv_sec = 0; + atv.tv_usec = 0; + } timo = 0; retry: ncoll = nselcoll; |