Re: event loop on Linux (was Re: Direct WAIS access support in libwww)

On Mon, 16 Jun 1997, Rick Kwan wrote:

> qinglong@yggdrasil.com writes...
>  
> >    I've failed to utilize direct WAIS access support in libwww-5.0a
> >  (libwww-5.1* just don't work for me on Linux --- they fail in deadloop).
> 
> I don't know if this is the same thing or not...  In libwww-5.0a on
> Linux, HTEventrg_loop() used to die on me.  I traced this back to the
> select() timeout value on Linux being updated to the unused time.  Once
> I got passed that it worked.

This should be handled as the following code enforces that the timeout 
pointer is either NULL or points to an updated waittime structure.

-eric
------------------------------HTEvtLst.c-------------------------------
    do {
        wt = NULL;
	...
        if (timeout != 0) {
            waittime.tv_sec = timeout / MILLI_PER_SECOND;
            waittime.tv_usec = (timeout % MILLI_PER_SECOND) *
                (1000000 / MILLI_PER_SECOND);
            wt = &waittime;
        }
	...
        active_sockets = select(maxfds+1, &treadset, &twriteset, 
				&texceptset, wt);
	...
	} while (!HTEndLoop);

Received on Monday, 16 June 1997 17:02:52 UTC