5252using namespace lldb ;
5353using namespace lldb_private ;
5454
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 ) {
5957 Log *log (GetLog (LLDBLog::Connection | LLDBLog::Object));
6058 LLDB_LOGF (log, " %p ConnectionFileDescriptor::ConnectionFileDescriptor ()" ,
6159 static_cast <void *>(this ));
6260}
6361
6462ConnectionFileDescriptor::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 ) {
6764 m_io_sp =
6865 std::make_shared<NativeFile>(fd, File::eOpenOptionReadWrite, owns_fd);
6966
@@ -76,8 +73,7 @@ ConnectionFileDescriptor::ConnectionFileDescriptor(int fd, bool owns_fd)
7673}
7774
7875ConnectionFileDescriptor::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 ) {
8177 InitializeSocket (socket);
8278}
8379
@@ -94,7 +90,7 @@ void ConnectionFileDescriptor::OpenCommandPipe() {
9490
9591 Log *log = GetLog (LLDBLog::Connection);
9692 // 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 );
9894 if (!result.Success ()) {
9995 LLDB_LOGF (log,
10096 " %p ConnectionFileDescriptor::OpenCommandPipe () - could not "
@@ -539,7 +535,7 @@ lldb::ConnectionStatus ConnectionFileDescriptor::AcceptSocket(
539535 Status *error_ptr) {
540536 Status error;
541537 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);
543539 Socket *accepted_socket;
544540
545541 if (!error.Fail ())
@@ -567,7 +563,7 @@ ConnectionFileDescriptor::ConnectSocket(Socket::SocketProtocol socket_protocol,
567563 Status *error_ptr) {
568564 Status error;
569565 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);
571567
572568 if (!error.Fail ())
573569 error = socket->Connect (socket_name);
@@ -649,7 +645,7 @@ ConnectionFileDescriptor::ConnectUDP(llvm::StringRef s,
649645 if (error_ptr)
650646 *error_ptr = Status ();
651647 llvm::Expected<std::unique_ptr<UDPSocket>> socket =
652- Socket::UdpConnect (s, m_child_processes_inherit );
648+ Socket::UdpConnect (s, /* child_processes_inherit= */ false );
653649 if (!socket) {
654650 if (error_ptr)
655651 *error_ptr = Status::FromError (socket.takeError ());
@@ -798,15 +794,6 @@ ConnectionStatus ConnectionFileDescriptor::ConnectSerialPort(
798794 llvm_unreachable (" this function should be only called w/ LLDB_ENABLE_POSIX" );
799795}
800796
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-
810797void ConnectionFileDescriptor::InitializeSocket (Socket *socket) {
811798 m_io_sp.reset (socket);
812799 m_uri = socket->GetRemoteConnectionURI ();
0 commit comments