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
This commit is contained in:
Tamas Berghammer 2015-03-19 14:58:36 +00:00
parent 539803c9e1
commit 00bdca6839
1 changed files with 1 additions and 0 deletions

View File

@ -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 ())
{