Why was the op interrupted? Retrying the op ignores the intent of the
signal. Or is there a problem with spurious signals?

Any system call in UNIX is allowed to be interrupted by EINTR. It is neither 
spurious or an error. As far as I can tell the correct behavior is to retry. If 
there really is an error you will get an error other than EINTR. I do not think 
this will cause an infinite loop.

Some stuff I read:

http://cboard.cprogramming.com/c-programming/105555-select-eintr.html

"There is no race condition in the code you posted -- it looks correct. But I would not 
bother reporting the "error" since a system call being interrupted by a signal is 
not really an error condition, it's just a normal UNIX event. If you get an error return and 
errno is EINTR, just restart the loop as if nothing happened.

In fact, many UNIX system calls can be interrupted by signals, and you should 
generally always check for EINTR and retry the system call."


---
http://redmine.lighttpd.net/issues/604

I see the same problem on NetBSD-4.

EINTR should always result in a retry of the failed system call (or other operation), not 
a "fatal" error.


--
To unsubscribe, send mail to [email protected].

Reply via email to