=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/top/top.c,v retrieving revision 1.80 retrieving revision 1.81 diff -c -r1.80 -r1.81 *** src/usr.bin/top/top.c 2013/01/14 21:33:59 1.80 --- src/usr.bin/top/top.c 2014/04/07 15:49:22 1.81 *************** *** 1,4 **** ! /* $OpenBSD: top.c,v 1.80 2013/01/14 21:33:59 guenther Exp $ */ /* * Top users/processes display for Unix --- 1,4 ---- ! /* $OpenBSD: top.c,v 1.81 2014/04/07 15:49:22 millert Exp $ */ /* * Top users/processes display for Unix *************** *** 601,610 **** * wait for either input or the end * of the delay period */ ! if (poll(pfd, 1, (int)(delay * 1000)) > 0 && ! !(pfd[0].revents & (POLLERR|POLLHUP|POLLNVAL))) { char *errmsg; ssize_t len; clear_message(); --- 601,612 ---- * wait for either input or the end * of the delay period */ ! if (poll(pfd, 1, (int)(delay * 1000)) > 0) { char *errmsg; ssize_t len; + + if ((pfd[0].revents & (POLLERR|POLLHUP|POLLNVAL))) + exit(1); clear_message();