[Lldb-commits] [PATCH] D59606: [lldb] [WIP/RFC] Add missing retries on EINTR
Michał Górny via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Mar 20 11:55:02 PDT 2019
mgorny added a comment.
In D59606#1436796 <https://reviews.llvm.org/D59606#1436796>, @labath wrote:
> The "problem" I have with this is that (IIRC) retrying close(2) on EINTR is the *wrong* thing to do on linux (because the fd will be closed anyway, and so we may end up closing someone else's file the second time around). I'll try to dig up more info about that tomorrow.
Just found http://alobbs.com/post/54503240599/close-and-eintr and indeed you're right. While I find that behavior really silly and would consider it a bug, I see that POSIX considers it 'undefined' whether the file is closed or not. I guess I'll have to be more careful when deciding which syscalls to wrap.
CHANGES SINCE LAST ACTION
More information about the lldb-commits