From 44e82db2919c9caab3530d03e066943c58dc6fcd Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Mon, 20 Jul 2015 16:14:46 +0000 Subject: [NativeProcessLinux] Bugfix in the monitor thread Make sure we dont treat EINTR as a fatal error. I was getting this when trying to profile the debugger. I'm not sure why this wasn't surfacing before, it could be that the profiler is using some signals internally. llvm-svn: 242681 --- lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp') diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp index 372ac789d6aa..85638720b9ab 100644 --- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp +++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp @@ -744,6 +744,9 @@ NativeProcessLinux::Monitor::MainLoop() int r = select(max_fd, &fds, nullptr, nullptr, nullptr); if (r < 0) { + if (errno == EINTR) + continue; + Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS)); if (log) log->Printf("NativeProcessLinux::Monitor::%s exiting because select failed: %s", -- cgit v1.2.3