Hi!
> 1. The threshold was too low; setting it to 10 seconds and adding an
>    overlap of 5 seconds ensures that the SIGALRM handler fires.

I do not agree with this part. The system time is set four seconds after
the created timer expiration time and because of that the signal hanlder
must be called immediately after that change (unless machine is under
heavy load, of course).

Looking at the code more closely, I'm not sure if it's a good idea to
mix sleep() (which may be implemented via SIGALRM) and timers that cause
SIGALRM too. The POSIX seems to say that it's not specified if signal
handler will be called in such case, only the interruption of sleep() is
guaranteed. 

-- 
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to