forked from OSchip/llvm-project
Dont' use O_CLOEXEC on Windows, since it doesn't exist.
llvm-svn: 228590
This commit is contained in:
parent
20937be183
commit
bf0f2b9b3a
|
@ -239,7 +239,11 @@ PseudoTerminal::Fork (char *error_str, size_t error_len)
|
|||
error_str[0] = '\0';
|
||||
|
||||
pid_t pid = LLDB_INVALID_PROCESS_ID;
|
||||
if (OpenFirstAvailableMaster (O_RDWR | O_CLOEXEC, error_str, error_len))
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue