lkml.org 
[lkml]   [1996]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Lynx spinning. Kernel problem?

> 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.

\
 
 \ /
  Last update: 2005-03-22 13:37    [from the cache]
©2003-2011 Jasper Spaans