aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2024-11-28 08:27:36 +0100
committerGitHub <noreply@github.com>2024-11-28 08:27:36 +0100
commitc1dff7152592f1beee9059ee8e2cb3cc68baea4d (patch)
treecc27f3370375c562e806f6366854bb02516366f5 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
parent93f7398bdba9d1547df21156db4d5393f0ab5ec8 (diff)
downloadllvm-c1dff7152592f1beee9059ee8e2cb3cc68baea4d.zip
llvm-c1dff7152592f1beee9059ee8e2cb3cc68baea4d.tar.gz
llvm-c1dff7152592f1beee9059ee8e2cb3cc68baea4d.tar.bz2
[lldb] Remove child_process_inherit from the socket classes (#117699)
It's never set to true. Also, using inheritable FDs in a multithreaded process pretty much guarantees descriptor leaks. It's better to explicitly pass a specific FD to a specific subprocess, which we already mostly can do using the ProcessLaunchInfo FileActions.
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
index 67b41b1..f746ced 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
@@ -1216,9 +1216,8 @@ void GDBRemoteCommunication::DumpHistory(Stream &strm) { m_history.Dump(strm); }
llvm::Error
GDBRemoteCommunication::ConnectLocally(GDBRemoteCommunication &client,
GDBRemoteCommunication &server) {
- const bool child_processes_inherit = false;
const int backlog = 5;
- TCPSocket listen_socket(true, child_processes_inherit);
+ TCPSocket listen_socket(true);
if (llvm::Error error =
listen_socket.Listen("localhost:0", backlog).ToError())
return error;