summaryrefslogtreecommitdiffstats
path: root/source/Target/ProcessLaunchInfo.cpp
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2015-02-09 01:44:09 +0000
committeremaste <emaste@FreeBSD.org>2015-02-09 01:44:09 +0000
commitd61b076ede88b56f3372a55e7d1eac6a9d717120 (patch)
treea8f4b3abea3e6937e60728991c736e6e3d322fc1 /source/Target/ProcessLaunchInfo.cpp
parent0c2019f4ca6b2dc6d710f6bb16a0e3ed10271531 (diff)
downloadFreeBSD-src-d61b076ede88b56f3372a55e7d1eac6a9d717120.zip
FreeBSD-src-d61b076ede88b56f3372a55e7d1eac6a9d717120.tar.gz
Import LLDB as of upstream SVN 228549 (git 39760838)
Diffstat (limited to 'source/Target/ProcessLaunchInfo.cpp')
-rw-r--r--source/Target/ProcessLaunchInfo.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/Target/ProcessLaunchInfo.cpp b/source/Target/ProcessLaunchInfo.cpp
index 451c42d..b841b2c 100644
--- a/source/Target/ProcessLaunchInfo.cpp
+++ b/source/Target/ProcessLaunchInfo.cpp
@@ -344,7 +344,14 @@ ProcessLaunchInfo::FinalizeFileActions (Target *target, bool default_to_use_pty)
log->Printf ("ProcessLaunchInfo::%s default_to_use_pty is set, and at least one stdin/stderr/stdout is unset, so generating a pty to use for it",
__FUNCTION__);
- if (m_pty->OpenFirstAvailableMaster(O_RDWR| O_NOCTTY, NULL, 0))
+ int open_flags = O_RDWR | O_NOCTTY;
+#if !defined(_MSC_VER)
+ // We really shouldn't be specifying platform specific flags
+ // that are intended for a system call in generic code. But
+ // this will have to do for now.
+ open_flags |= O_CLOEXEC;
+#endif
+ if (m_pty->OpenFirstAvailableMaster(open_flags, NULL, 0))
{
const char *slave_path = m_pty->GetSlaveName(NULL, 0);
OpenPOWER on IntegriCloud