=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/top/top.c,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- src/usr.bin/top/top.c 2003/11/01 20:20:57 1.30 +++ src/usr.bin/top/top.c 2004/05/07 19:19:49 1.31 @@ -1,4 +1,4 @@ -/* $OpenBSD: top.c,v 1.30 2003/11/01 20:20:57 deraadt Exp $ */ +/* $OpenBSD: top.c,v 1.31 2004/05/07 19:19:49 millert Exp $ */ /* * Top users/processes display for Unix @@ -561,7 +561,8 @@ * wait for either input or the end * of the delay period */ - if (poll(pfd, 1, delay * 1000) > 0) { + if (poll(pfd, 1, delay * 1000) > 0 && + !(pfd[0].revents & (POLLERR|POLLHUP|POLLNVAL))) { char *errmsg; ssize_t len; int newval;