summaryrefslogtreecommitdiffstats
path: root/lldb/tools/lldb-mi/MIUtilFileStd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/tools/lldb-mi/MIUtilFileStd.cpp')
-rw-r--r--lldb/tools/lldb-mi/MIUtilFileStd.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lldb/tools/lldb-mi/MIUtilFileStd.cpp b/lldb/tools/lldb-mi/MIUtilFileStd.cpp
index 4aabd53b22b..1af9a5871d6 100644
--- a/lldb/tools/lldb-mi/MIUtilFileStd.cpp
+++ b/lldb/tools/lldb-mi/MIUtilFileStd.cpp
@@ -18,6 +18,7 @@
#include "lldb/Host/FileSystem.h"
#include "llvm/Support/ConvertUTF.h"
+#include "llvm/Support/Errno.h"
//++
//------------------------------------------------------------------------------------
@@ -83,7 +84,8 @@ bool CMIUtilFileStd::CreateWrite(const CMIUtilString &vFileNamePath,
#if !defined(_MSC_VER)
// Open with 'write' and 'binary' mode
- m_pFileHandle = ::fopen(vFileNamePath.c_str(), "wb");
+ m_pFileHandle = llvm::sys::RetryAfterSignal(nullptr, ::fopen,
+ vFileNamePath.c_str(), "wb");
#else
// Open a file with exclusive write and shared read permissions
std::wstring path;
@@ -226,7 +228,8 @@ bool CMIUtilFileStd::IsFileExist(const CMIUtilString &vFileNamePath) const {
return false;
FILE *pTmp = nullptr;
- pTmp = ::fopen(vFileNamePath.c_str(), "wb");
+ pTmp = llvm::sys::RetryAfterSignal(nullptr, ::fopen,
+ vFileNamePath.c_str(), "wb");
if (pTmp != nullptr) {
::fclose(pTmp);
return true;
OpenPOWER on IntegriCloud