From 00bdca68399cb56044c3b6c5e268c60b06992463 Mon Sep 17 00:00:00 2001 From: Tamas Berghammer Date: Thu, 19 Mar 2015 14:58:36 +0000 Subject: Don't close pseudo terminal master file descriptor on EOF Some application on Linux an all application on android close stdout and stderr during the libc exit stage. Previously the master file descriptor of the pseudo terminal used to communicate with the inferior was closed on an EOF causing a race condition and a possible SIGHUP on process exit. After this change the master file descriptor will be closed by the destructor of the GDBRemoteCommunicationServerLLGS class. Differential revision: http://reviews.llvm.org/D8436 llvm-svn: 232724 --- .../Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp') diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp index 70e542c908c..d4a1643dc50 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp @@ -806,6 +806,7 @@ GDBRemoteCommunicationServerLLGS::SetSTDIOFileDescriptor (int fd) return error; } + m_stdio_communication.SetCloseOnEOF (false); m_stdio_communication.SetConnection (conn_up.release()); if (!m_stdio_communication.IsConnected ()) { -- cgit v1.2.3