summaryrefslogtreecommitdiff
path: root/lldb/source/Host/posix/FileSystem.cpp
diff options
context:
space:
mode:
authorMichal Gorny <mgorny@gentoo.org>2019-03-21 19:35:55 +0000
committerMichal Gorny <mgorny@gentoo.org>2019-03-21 19:35:55 +0000
commit2819136f0a3d75f3b6fefe5f962efdbf66e99c12 (patch)
treedaa3971def7f0d9e8d59169ca53d594b2940e62b /lldb/source/Host/posix/FileSystem.cpp
parentc56872589f1593eb0e6ccd9ee2c3e1be0c947e08 (diff)
[lldb] Add missing EINTR handling
Differential Revision: https://reviews.llvm.org/D59606 llvm-svn: 356703
Diffstat (limited to 'lldb/source/Host/posix/FileSystem.cpp')
-rw-r--r--lldb/source/Host/posix/FileSystem.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lldb/source/Host/posix/FileSystem.cpp b/lldb/source/Host/posix/FileSystem.cpp
index 65791cb4c421..32fae68abb4d 100644
--- a/lldb/source/Host/posix/FileSystem.cpp
+++ b/lldb/source/Host/posix/FileSystem.cpp
@@ -25,6 +25,7 @@
#include "lldb/Utility/Status.h"
#include "lldb/Utility/StreamString.h"
+#include "llvm/Support/Errno.h"
#include "llvm/Support/FileSystem.h"
using namespace lldb;
@@ -71,9 +72,9 @@ Status FileSystem::ResolveSymbolicLink(const FileSpec &src, FileSpec &dst) {
}
FILE *FileSystem::Fopen(const char *path, const char *mode) {
- return ::fopen(path, mode);
+ return llvm::sys::RetryAfterSignal(nullptr, ::fopen, path, mode);
}
int FileSystem::Open(const char *path, int flags, int mode) {
- return ::open(path, flags, mode);
+ return llvm::sys::RetryAfterSignal(-1, ::open, path, flags, mode);
}