diff --git a/top/top.c b/top/top.c index ea3d9e0c..a1fad9fc 100644 --- a/top/top.c +++ b/top/top.c @@ -884,7 +884,11 @@ static inline int ioa (struct timespec *ts) { FD_ZERO(&fs); FD_SET(STDIN_FILENO, &fs); +#ifdef OFF_SIGWINCH // conditional comments are silly, but help in documenting + // hold here until we've got keyboard input, any signal (including SIGWINCH) +#else // hold here until we've got keyboard input, any signal except SIGWINCH +#endif // or (optionally) we timeout with nanosecond granularity rc = pselect(STDIN_FILENO + 1, &fs, NULL, NULL, ts, &Sigwinch_set); @@ -3741,7 +3745,9 @@ static void wins_stage_2 (void) { // lastly, initialize a signal set used to throttle one troublesome signal sigemptyset(&Sigwinch_set); +#ifndef OFF_SIGWINCH sigaddset(&Sigwinch_set, SIGWINCH); +#endif } // end: wins_stage_2 /*###### Interactive Input support (do_key helpers) ####################*/ diff --git a/top/top.h b/top/top.h index f2dcaf10..c19808c1 100644 --- a/top/top.h +++ b/top/top.h @@ -39,6 +39,7 @@ //#define NOBOOST_MEMS /* disable extra precision for mem fields */ //#define NOBOOST_PCNT /* disable extra precision for % fields */ //#define OFF_HST_HASH /* use BOTH qsort+bsrch vs. hashing scheme */ +//#define OFF_SIGWINCH /* favor response over reduced signal load */ //#define OFF_STDIOLBF /* disable our own stdout _IOFBF override */ //#define PRETEND2_5_X /* pretend we're linux 2.5.x (for IO-wait) */ //#define PRETEND4CPUS /* pretend we're smp with 4 ticsers (sic) */