Another possibility is that its function is used only in the application (or part) that has done something to ensure that the call is not interrupted by a signal. If you are not going to do anything important with signals, then you do not need to respond to them, and it might make sense to mask them all, rather than wrapping each individual system call in an EINTR attempt. Except, of course, those who will kill you, so SIGKILL and often SIGPIPE, if you deal with this, quit smoking along with SIGSEGV and similar fatal errors, which in any case will never be delivered to the correct application for user space.
In any case, if all he talks about is security, then, quite possibly, he does not need to repeat close . If EIO does not work, then he will not be able to retry, it will be a permanent failure. Therefore, for the correctness of its program, close not required. It is possible that for the correctness of its program, it is not necessary to repeat the close attempt on EINTR.
Usually you want your program to do its best to succeed, which means you have to try again at EINTR. But this is a separate safety concern. If your program is designed in such a way that some function does not work for any reason, is not a security flaw, then, in particular, the fact that it did not accidentally fail EINTR, and not for a permanent reason, is not a flaw. It is known that the DJB is quite self-confident, so I would not be surprised if he proved why he does not need to try again, and therefore does not bother, even if this allows his program to succeed in resetting the knob in certain situations, where, perhaps, it is currently failing (for example, explicitly sending the user a harmless signal with kill at a crucial moment).
Edit: It seems to me that retrying EINTR could potentially be a security flaw under certain conditions. It introduces a new behavior into this section of code: it can loop endlessly in response to a signal stream, where earlier it would make one close attempt, and then return. I don’t know for sure that this will cause qmail any problems (after all, close itself does not guarantee how soon it will return). But if you give up one attempt, make the code easier to analyze, then this may be a reasonable step. Or not.
You might think that retrying prevents a DoS error when a signal causes a false failure. But retrying allows another (more complex) drawback of DoS when the signal stream causes an indefinite stall. In binary terms, “can this application be DoSed?”, What is the absolute security issue that DJB was interested in when qmail and djbdns wrote, it does not matter. If something can happen once, then usually it means that it can happen many times.