[Lldb-commits] [lldb] r192929 - Removed unnecessary call to OpenFirstAvailableMaster.
Richard Mitton
richard at codersnotes.com
Thu Oct 17 15:36:28 PDT 2013
Author: rmitton
Date: Thu Oct 17 17:36:28 2013
New Revision: 192929
URL: http://llvm.org/viewvc/llvm-project?rev=192929&view=rev
Log:
Removed unnecessary call to OpenFirstAvailableMaster.
::Fork already does this internally, so this was simply leaking file handles.
This fixes the problem where the test suite would occasionally run out of file handles.
Modified:
lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp
Modified: lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp?rev=192929&r1=192928&r2=192929&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp (original)
+++ lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp Thu Oct 17 17:36:28 2013
@@ -857,14 +857,6 @@ ProcessMonitor::Launch(LaunchArgs *args)
if (envp == NULL || envp[0] == NULL)
envp = const_cast<const char **>(environ);
- // Pseudo terminal setup.
- if (!terminal.OpenFirstAvailableMaster(O_RDWR | O_NOCTTY, err_str, err_len))
- {
- args->m_error.SetErrorToGenericError();
- args->m_error.SetErrorString("Could not open controlling TTY.");
- goto FINISH;
- }
-
if ((pid = terminal.Fork(err_str, err_len)) == -1)
{
args->m_error.SetErrorToGenericError();
Modified: lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp?rev=192929&r1=192928&r2=192929&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/ProcessMonitor.cpp Thu Oct 17 17:36:28 2013
@@ -1171,14 +1171,6 @@ ProcessMonitor::Launch(LaunchArgs *args)
if (envp == NULL || envp[0] == NULL)
envp = const_cast<const char **>(environ);
- // Pseudo terminal setup.
- if (!terminal.OpenFirstAvailableMaster(O_RDWR | O_NOCTTY, err_str, err_len))
- {
- args->m_error.SetErrorToGenericError();
- args->m_error.SetErrorString("Could not open controlling TTY.");
- goto FINISH;
- }
-
if ((pid = terminal.Fork(err_str, err_len)) == -1)
{
args->m_error.SetErrorToGenericError();
More information about the lldb-commits
mailing list