Re: [exim] Re: Exim 4.42 sleeping "forever"

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Andrew - Supernews
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [exim] Re: Exim 4.42 sleeping "forever"
>>>>> "Philip" == Philip Hazel <ph10@???> writes:

>> Is it worth adding a check in milliwait() that setitimer()
>> succeeds before going into sigsuspend()?


Philip> And what do you do if it fails?

Better to dike out the whole setitimer/sigsuspend stuff and use
the old reliable: select(0,NULL,NULL,NULL,&timeval); to do the
wait in one call. If that fails, you just don't end up waiting,
which is no big deal.

(Perhaps look at using usleep/nanosleep as an option on those
platforms that have them? though the select() version is usually more
portable, so it may not be worth the bother.)

--
Andrew, Supernews
http://www.supernews.com