Re: Lynx spinning. Kernel problem?

Steve VanDevender (
Tue, 26 Nov 1996 07:07:06 -0800

> On Mon, 25 Nov 1996, Alan Cox wrote:
> >
> > > So what I imagine is happening is lynx (2.3 BETA) calls 'connect'
> > > with a non-blocking socket, and connect returns immediately. Then lynx
> > > selects with a zero timeout, the select returns, and lynx calls connect
> > > again. But why would lynx do anything so stupid?
> >
> > Lynx is written by folks who didnt read the man pages to select
> > carefully. Make it reassign a timeout to the select before each select
> > call

I just discovered that XFree86-3.2 makes the same mistake in an
out-of-the-way Xt feature. If you add an XtWorkProc (gets called every
time the event loop is idle) then eventually after some random amount of
time the select() call in XtAppMainLoop runs out of time in its timeout
struct and your XtWorkProc stops getting called. !$#^*&.

Fortunately XtAppAddTimeOut works nearly as well for this.