[Lldb-commits] [lldb] r228171 - Fix broken windows build due to use of O_CLOEXEC.
Zachary Turner
zturner at google.com
Wed Feb 4 11:11:48 PST 2015
Author: zturner
Date: Wed Feb 4 13:11:48 2015
New Revision: 228171
URL: http://llvm.org/viewvc/llvm-project?rev=228171&view=rev
Log:
Fix broken windows build due to use of O_CLOEXEC.
Modified:
lldb/trunk/source/Target/ProcessLaunchInfo.cpp
Modified: lldb/trunk/source/Target/ProcessLaunchInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ProcessLaunchInfo.cpp?rev=228171&r1=228170&r2=228171&view=diff
==============================================================================
--- lldb/trunk/source/Target/ProcessLaunchInfo.cpp (original)
+++ lldb/trunk/source/Target/ProcessLaunchInfo.cpp Wed Feb 4 13:11:48 2015
@@ -344,7 +344,14 @@ ProcessLaunchInfo::FinalizeFileActions (
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 | O_CLOEXEC, 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);
More information about the lldb-commits
mailing list