Current-Users archive

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

Re: select/poll bug?

On Sat, 2008-08-02 at 22:07 -0400, Greg A. Woods; Planix, Inc. wrote:
> On 2-Aug-08, at 6:57 PM, Roy Marples wrote:
> >
> > Not entirely sure what you mean here, but some research just put a  
> > nail
> > in using select - well it's coffin anyway. POSIX only says it has to
> > wait upto 31 days. Linux has a hard limit which is hard to work out,  
> > so
> > I'm now looping on poll. I really really wish the man pages were  
> > better
> > documented about this!
> I'm not sure why you want to set a timer for the whole lease.
> Why not set a regular timer and decrement the remaining lease TTL on  
> that interval?
> The extra CPU cycles through such a loop, even counting all the kernel  
> time for the system call transitions, is inevitably negligible over  
> such periods as DAYS.

For the duration of the lease we need to monitor a signal pipe and the
fd for link carrier messages. As select,poll and friends have timeouts
it makes sense to use them instead of calls like setitimer.



Home | Main Index | Thread Index | Old Index