[Lldb-commits] [PATCH] Don't close psedo terminal master file descriptor on EOF

Tamas Berghammer tberghammer at google.com
Thu Mar 19 06:57:48 PDT 2015


Hi labath, ovyalov,

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.

http://reviews.llvm.org/D8436

Files:
  source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp

Index: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
===================================================================
--- source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
+++ source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
@@ -806,6 +806,7 @@
         return error;
     }
 
+    m_stdio_communication.SetCloseOnEOF (false);
     m_stdio_communication.SetConnection (conn_up.release());
     if (!m_stdio_communication.IsConnected ())
     {

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8436.22254.patch
Type: text/x-patch
Size: 515 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150319/e065e7f6/attachment.bin>


More information about the lldb-commits mailing list