summaryrefslogtreecommitdiffstats
path: root/lldb/source/Utility/PseudoTerminal.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2015-02-25 19:52:41 +0000
committerZachary Turner <zturner@google.com>2015-02-25 19:52:41 +0000
commit49be160531053ba001f0337951572ea9de064eb9 (patch)
treea4a43bc960f558bc8d58b7fcc972d63db3a4eda1 /lldb/source/Utility/PseudoTerminal.cpp
parent8f12ce082508a700c463f186da67a36cfea7d568 (diff)
downloadbcm5719-llvm-49be160531053ba001f0337951572ea9de064eb9.tar.gz
bcm5719-llvm-49be160531053ba001f0337951572ea9de064eb9.zip
Revert "Fix warnings found with clang-cl."
SWIG doesn't like enum : unsigned. Revert this until I can fix this in a way that swig likes. llvm-svn: 230531
Diffstat (limited to 'lldb/source/Utility/PseudoTerminal.cpp')
-rw-r--r--lldb/source/Utility/PseudoTerminal.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Utility/PseudoTerminal.cpp b/lldb/source/Utility/PseudoTerminal.cpp
index 36d82aeb60e..e728d4ab2a9 100644
--- a/lldb/source/Utility/PseudoTerminal.cpp
+++ b/lldb/source/Utility/PseudoTerminal.cpp
@@ -235,13 +235,14 @@ PseudoTerminal::GetSlaveName (char *error_str, size_t error_len) const
lldb::pid_t
PseudoTerminal::Fork (char *error_str, size_t error_len)
{
- pid_t pid = LLDB_INVALID_PROCESS_ID;
-#if !defined(_MSC_VER)
if (error_str)
error_str[0] = '\0';
+ pid_t pid = LLDB_INVALID_PROCESS_ID;
int flags = O_RDWR;
+#if !defined(_MSC_VER)
flags |= O_CLOEXEC;
+#endif
if (OpenFirstAvailableMaster (flags, error_str, error_len))
{
// Successfully opened our master pseudo terminal
@@ -299,7 +300,6 @@ PseudoTerminal::Fork (char *error_str, size_t error_len)
// Do nothing and let the pid get returned!
}
}
-#endif
return pid;
}
OpenPOWER on IntegriCloud