[llvm] Support: don't block signals around close if it can be avoided (PR #73009)
Alexander Richardson via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 2 11:00:41 PST 2024
https://github.com/arichardson commented:
Looking a various sources it looks like this change to ignore EINTR is correct: Linux manpage says it will be closed https://man7.org/linux/man-pages/man2/close.2.html and https://lwn.net/Articles/576478/ says EINTR will (almost?) never be returned.
On the FreeBSD side, @mjguzik's assertion that it will also close the FD even if EINTR is returned sounds good to me. Not sure about the other BSD implementations but maybe they do the same?
So this change looks good to me but I'd ask that the comment is updated to explain why EINTR can be ignored in more detailed (and maybe add a reference to e.g. the Linux manpage).
https://github.com/llvm/llvm-project/pull/73009
More information about the llvm-commits
mailing list