commit | 9c4fda6cd2d64304c218fb58e83e9b3b054898f5 | [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 | 151499e47e0612f40748a45fa235176814ca5b1f [diff] | |
parent | 4b019a5f25ab3a930e42f035bb5091152d34a8b5 [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;