--- rxvt-unicode/src/command.C 2006/01/31 21:35:39 1.302 +++ rxvt-unicode/src/command.C 2006/01/31 21:47:56 1.303 @@ -57,6 +57,10 @@ #include +#if LINUX_YIELD_HACK +# include +#endif + /*----------------------------------------------------------------------*/ #define IS_CONTROL(ch) !((ch) & 0xffffff60UL) @@ -1099,7 +1103,13 @@ void yield_cb (check_watcher &w) { - usleep (0); + // this should really be sched_yield(), but the linux guys thought + // that giving a process calling sched_yield () less cpu time than + // ones with high nice levels. + + struct timespec ts = { 0, 0 }; + nanosleep (&ts, 0); + w.stop (); }