diff options
Diffstat (limited to 'lldb/source/Utility/PseudoTerminal.cpp')
-rw-r--r-- | lldb/source/Utility/PseudoTerminal.cpp | 6 |
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; } |