forked from OSchip/llvm-project
parent
e4b846e0d8
commit
44e442b3df
|
@ -169,7 +169,7 @@ namespace lldb_private
|
|||
lldb_utility::PseudoTerminal &
|
||||
GetPTY ()
|
||||
{
|
||||
return m_pty;
|
||||
return *m_pty;
|
||||
}
|
||||
|
||||
lldb::ListenerSP
|
||||
|
@ -212,7 +212,7 @@ namespace lldb_private
|
|||
std::string m_shell;
|
||||
Flags m_flags; // Bitwise OR of bits from lldb::LaunchFlags
|
||||
std::vector<FileAction> m_file_actions; // File actions for any other files
|
||||
lldb_utility::PseudoTerminal m_pty;
|
||||
std::shared_ptr<lldb_utility::PseudoTerminal> m_pty;
|
||||
uint32_t m_resume_count; // How many times do we resume after launching
|
||||
Host::MonitorChildProcessCallback m_monitor_callback;
|
||||
void *m_monitor_callback_baton;
|
||||
|
|
|
@ -31,7 +31,7 @@ ProcessLaunchInfo::ProcessLaunchInfo () :
|
|||
m_shell (),
|
||||
m_flags (0),
|
||||
m_file_actions (),
|
||||
m_pty (),
|
||||
m_pty (new lldb_utility::PseudoTerminal),
|
||||
m_resume_count (0),
|
||||
m_monitor_callback (NULL),
|
||||
m_monitor_callback_baton (NULL),
|
||||
|
@ -41,19 +41,19 @@ ProcessLaunchInfo::ProcessLaunchInfo () :
|
|||
}
|
||||
|
||||
ProcessLaunchInfo::ProcessLaunchInfo(const char *stdin_path, const char *stdout_path, const char *stderr_path,
|
||||
const char *working_directory, uint32_t launch_flags) :
|
||||
ProcessInfo(),
|
||||
m_working_dir(),
|
||||
m_plugin_name(),
|
||||
m_shell(),
|
||||
m_flags(launch_flags),
|
||||
m_file_actions(),
|
||||
m_pty(),
|
||||
m_resume_count(0),
|
||||
m_monitor_callback(NULL),
|
||||
m_monitor_callback_baton(NULL),
|
||||
m_monitor_signals(false),
|
||||
m_hijack_listener_sp()
|
||||
const char *working_directory, uint32_t launch_flags)
|
||||
: ProcessInfo()
|
||||
, m_working_dir()
|
||||
, m_plugin_name()
|
||||
, m_shell()
|
||||
, m_flags(launch_flags)
|
||||
, m_file_actions()
|
||||
, m_pty(new lldb_utility::PseudoTerminal)
|
||||
, m_resume_count(0)
|
||||
, m_monitor_callback(NULL)
|
||||
, m_monitor_callback_baton(NULL)
|
||||
, m_monitor_signals(false)
|
||||
, m_hijack_listener_sp()
|
||||
{
|
||||
if (stdin_path)
|
||||
{
|
||||
|
@ -304,8 +304,8 @@ ProcessLaunchInfo::FinalizeFileActions (Target *target, bool default_to_use_pty)
|
|||
AppendOpenFileAction(STDERR_FILENO, path, false, true);
|
||||
|
||||
if (default_to_use_pty && (!in_path || !out_path || !err_path)) {
|
||||
if (m_pty.OpenFirstAvailableMaster(O_RDWR| O_NOCTTY, NULL, 0)) {
|
||||
const char *slave_path = m_pty.GetSlaveName(NULL, 0);
|
||||
if (m_pty->OpenFirstAvailableMaster(O_RDWR| O_NOCTTY, NULL, 0)) {
|
||||
const char *slave_path = m_pty->GetSlaveName(NULL, 0);
|
||||
|
||||
if (!in_path) {
|
||||
AppendOpenFileAction(STDIN_FILENO, slave_path, true, false);
|
||||
|
|
Loading…
Reference in New Issue