=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/top/top.c,v retrieving revision 1.10 retrieving revision 1.11 diff -c -r1.10 -r1.11 *** src/usr.bin/top/top.c 2001/09/04 23:35:59 1.10 --- src/usr.bin/top/top.c 2001/09/05 06:25:39 1.11 *************** *** 1,4 **** ! /* $OpenBSD: top.c,v 1.10 2001/09/04 23:35:59 millert Exp $ */ const char copyright[] = "Copyright (c) 1984 through 1996, William LeFebvre"; --- 1,4 ---- ! /* $OpenBSD: top.c,v 1.11 2001/09/05 06:25:39 deraadt Exp $ */ const char copyright[] = "Copyright (c) 1984 through 1996, William LeFebvre"; *************** *** 609,615 **** /* set up arguments for select with timeout */ FD_ZERO(&readfds); ! FD_SET(1, &readfds); /* for standard input */ timeout.tv_sec = delay; timeout.tv_usec = 0; --- 609,615 ---- /* set up arguments for select with timeout */ FD_ZERO(&readfds); ! FD_SET(STDIN_FILENO, &readfds); /* for standard input */ timeout.tv_sec = delay; timeout.tv_usec = 0; *************** *** 658,664 **** } /* wait for either input or the end of the delay period */ ! if (select(32, &readfds, (fd_set *)NULL, (fd_set *)NULL, &timeout) > 0) { int newval; char *errmsg; --- 658,665 ---- } /* wait for either input or the end of the delay period */ ! if (select(STDIN_FILENO + 1, &readfds, (fd_set *)NULL, ! (fd_set *)NULL, &timeout) > 0) { int newval; char *errmsg;