procps-3.2.5-eof.diff 538 B

123456789101112
  1. --- procps-3.2.5/top.c
  2. +++ procps-3.2.5/top.c
  3. @@ -3285,7 +3285,7 @@
  4. if (rc <= 0) {
  5. // EOF is pretty much a "can't happen" except for a kernel bug.
  6. // We should quickly die via SIGHUP, and thus not spin here.
  7. - // if (rc == 0) end_pgm(0); /* EOF from terminal */
  8. + if (rc == 0) end_pgm(0); /* EOF from terminal */
  9. fcntl(STDIN_FILENO, F_SETFL, file_flags);
  10. select(1, &fs, NULL, NULL, &tv);
  11. fcntl(STDIN_FILENO, F_SETFL, O_NONBLOCK|file_flags);