Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: select/poll bug?

On Sun, 2008-08-03 at 13:18 -0400, Greg A. Woods; Planix, Inc. wrote:
> You still haven't said why you need a timer that can handle in one  
> setting the span of the entire maximum possible lease time.  Why not  
> set a regular interval timeout and decrement the elapsed time from the  
> lease TTL every time the timeout happens until finally there's no time  
> remaining on the lease, perhaps adjusting the interval of the timeout  
> as the lease nears its expiry time.

It doesn't HAVE to be the max possible lease. It's more effecient to
make one call than lots of small calls, hence the bigger the timeout the
more efficient the program.

dhcpcd currently does what you describe around poll, using INT_MAX as
the upper limit.



Home | Main Index | Thread Index | Old Index