[lldb] Add missing EINTR handling

Differential Revision: https://reviews.llvm.org/D59606

llvm-svn: 356703
This commit is contained in:
Michal Gorny
2019-03-21 19:35:55 +00:00
parent c56872589f
commit 2819136f0a
15 changed files with 52 additions and 26 deletions

View File

@@ -21,6 +21,7 @@
#include "lldb/Utility/Stream.h"
#include "llvm/Support/ConvertUTF.h"
#include "llvm/Support/Errno.h"
#include <stdio.h>
@@ -39,7 +40,7 @@ void StructuredPythonObject::Dump(Stream &s, bool pretty_print) const {
void PythonObject::Dump(Stream &strm) const {
if (m_py_obj) {
FILE *file = ::tmpfile();
FILE *file = llvm::sys::RetryAfterSignal(nullptr, ::tmpfile);
if (file) {
::PyObject_Print(m_py_obj, file, 0);
const long length = ftell(file);