On Fri, Aug 29, 2003 at 12:24:09PM -0700, Michael wrote:
Thanks for the quick reply, this patch compiles successfully
However it still wont accept any keystrokes once iftop is started.. I've tried the keys to change the display while in iftop, and q to quit, and ctrl-z, c, and x, and Break and ctrl-just-about-everything =/ but I appreciate the help!
For me, keys work, but response is *incredibly* sluggish.
I think the problem is that OpenBSD's thread support is userland and therefore I/O in any thread blocks others. There's some blurb about this here:
http://groups.google.com/groups?selm=19991222000819.24957.qmail_hotmail.com%...
or see pthreads(3):
In OpenBSD, threads are implemented in a user-level library. A program using these routines must be linked with the -pthread option.
In particular, the thread running pcap_dispatch seems to stop any of the other threads running, much.
Replacing pthread_testcancel() with usleep(10000) makes it more responsive, but (a) is really ugly, and (b) may do bad things to the accuracy of the program. Paul-- thoughts?