diff options
author | Tamas Berghammer <tberghammer@google.com> | 2015-03-19 14:58:36 +0000 |
---|---|---|
committer | Tamas Berghammer <tberghammer@google.com> | 2015-03-19 14:58:36 +0000 |
commit | 00bdca68399cb56044c3b6c5e268c60b06992463 (patch) | |
tree | 1bc96d575d8b59b6d4fb038f9815e062e1591f82 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp | |
parent | 539803c9e117ed6faeb444ea134877b55541db74 (diff) | |
download | llvm-00bdca68399cb56044c3b6c5e268c60b06992463.zip llvm-00bdca68399cb56044c3b6c5e268c60b06992463.tar.gz llvm-00bdca68399cb56044c3b6c5e268c60b06992463.tar.bz2 |
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
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp index 70e542c..d4a1643 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 ()) { |