commit | f074e78a7cb1591987dce37c75810a0b6aa1972a | [log] [tgz] |
---|---|---|
author | Treehugger Robot <treehugger-gerrit@google.com> | Fri Feb 08 06:56:47 2019 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Fri Feb 08 06:56:47 2019 +0000 |
tree | 7d506d186e458b3543ced3f24fad992ea182359a | |
parent | 6213d4c21c5822bf23996d77da8dd5302aba820e [diff] | |
parent | 9e9172b4a470bf370dee356e8b458292575162b6 [diff] |
Merge "adb: "support" O_CLOEXEC in adb_open on Windows."
diff --git a/adb/sysdeps_win32.cpp b/adb/sysdeps_win32.cpp index d587589..4c5d8cb 100644 --- a/adb/sysdeps_win32.cpp +++ b/adb/sysdeps_win32.cpp
@@ -356,6 +356,9 @@ DWORD desiredAccess = 0; DWORD shareMode = FILE_SHARE_READ | FILE_SHARE_WRITE; + // CreateFileW is inherently O_CLOEXEC by default. + options &= ~O_CLOEXEC; + switch (options) { case O_RDONLY: desiredAccess = GENERIC_READ;