52
52
using namespace lldb ;
53
53
using namespace lldb_private ;
54
54
55
- ConnectionFileDescriptor::ConnectionFileDescriptor (bool child_processes_inherit)
56
- : Connection(), m_pipe(), m_mutex(), m_shutting_down(false ),
57
-
58
- m_child_processes_inherit(child_processes_inherit) {
55
+ ConnectionFileDescriptor::ConnectionFileDescriptor ()
56
+ : Connection(), m_pipe(), m_mutex(), m_shutting_down(false ) {
59
57
Log *log (GetLog (LLDBLog::Connection | LLDBLog::Object));
60
58
LLDB_LOGF (log, " %p ConnectionFileDescriptor::ConnectionFileDescriptor ()" ,
61
59
static_cast <void *>(this ));
62
60
}
63
61
64
62
ConnectionFileDescriptor::ConnectionFileDescriptor (int fd, bool owns_fd)
65
- : Connection(), m_pipe(), m_mutex(), m_shutting_down(false ),
66
- m_child_processes_inherit(false ) {
63
+ : Connection(), m_pipe(), m_mutex(), m_shutting_down(false ) {
67
64
m_io_sp =
68
65
std::make_shared<NativeFile>(fd, File::eOpenOptionReadWrite, owns_fd);
69
66
@@ -76,8 +73,7 @@ ConnectionFileDescriptor::ConnectionFileDescriptor(int fd, bool owns_fd)
76
73
}
77
74
78
75
ConnectionFileDescriptor::ConnectionFileDescriptor (Socket *socket)
79
- : Connection(), m_pipe(), m_mutex(), m_shutting_down(false ),
80
- m_child_processes_inherit(false ) {
76
+ : Connection(), m_pipe(), m_mutex(), m_shutting_down(false ) {
81
77
InitializeSocket (socket);
82
78
}
83
79
@@ -94,7 +90,7 @@ void ConnectionFileDescriptor::OpenCommandPipe() {
94
90
95
91
Log *log = GetLog (LLDBLog::Connection);
96
92
// Make the command file descriptor here:
97
- Status result = m_pipe.CreateNew (m_child_processes_inherit );
93
+ Status result = m_pipe.CreateNew (/* child_processes_inherit= */ false );
98
94
if (!result.Success ()) {
99
95
LLDB_LOGF (log,
100
96
" %p ConnectionFileDescriptor::OpenCommandPipe () - could not "
@@ -539,7 +535,7 @@ lldb::ConnectionStatus ConnectionFileDescriptor::AcceptSocket(
539
535
Status *error_ptr) {
540
536
Status error;
541
537
std::unique_ptr<Socket> listening_socket =
542
- Socket::Create (socket_protocol, m_child_processes_inherit , error);
538
+ Socket::Create (socket_protocol, /* child_processes_inherit= */ false , error);
543
539
Socket *accepted_socket;
544
540
545
541
if (!error.Fail ())
@@ -567,7 +563,7 @@ ConnectionFileDescriptor::ConnectSocket(Socket::SocketProtocol socket_protocol,
567
563
Status *error_ptr) {
568
564
Status error;
569
565
std::unique_ptr<Socket> socket =
570
- Socket::Create (socket_protocol, m_child_processes_inherit , error);
566
+ Socket::Create (socket_protocol, /* child_processes_inherit= */ false , error);
571
567
572
568
if (!error.Fail ())
573
569
error = socket->Connect (socket_name);
@@ -649,7 +645,7 @@ ConnectionFileDescriptor::ConnectUDP(llvm::StringRef s,
649
645
if (error_ptr)
650
646
*error_ptr = Status ();
651
647
llvm::Expected<std::unique_ptr<UDPSocket>> socket =
652
- Socket::UdpConnect (s, m_child_processes_inherit );
648
+ Socket::UdpConnect (s, /* child_processes_inherit= */ false );
653
649
if (!socket) {
654
650
if (error_ptr)
655
651
*error_ptr = Status::FromError (socket.takeError ());
@@ -798,15 +794,6 @@ ConnectionStatus ConnectionFileDescriptor::ConnectSerialPort(
798
794
llvm_unreachable (" this function should be only called w/ LLDB_ENABLE_POSIX" );
799
795
}
800
796
801
- bool ConnectionFileDescriptor::GetChildProcessesInherit () const {
802
- return m_child_processes_inherit;
803
- }
804
-
805
- void ConnectionFileDescriptor::SetChildProcessesInherit (
806
- bool child_processes_inherit) {
807
- m_child_processes_inherit = child_processes_inherit;
808
- }
809
-
810
797
void ConnectionFileDescriptor::InitializeSocket (Socket *socket) {
811
798
m_io_sp.reset (socket);
812
799
m_uri = socket->GetRemoteConnectionURI ();
0 commit comments