Merge "adb: "support" O_CLOEXEC in adb_open on Windows."
am: 9c4fda6cd2
Change-Id: Ie24c95b84e62093cb63e79ec52b3d378c4531698
This commit is contained in:
commit
c1f4e167b6
1 changed files with 3 additions and 0 deletions
|
|
@ -356,6 +356,9 @@ int adb_open(const char* path, int options) {
|
||||||
DWORD desiredAccess = 0;
|
DWORD desiredAccess = 0;
|
||||||
DWORD shareMode = FILE_SHARE_READ | FILE_SHARE_WRITE;
|
DWORD shareMode = FILE_SHARE_READ | FILE_SHARE_WRITE;
|
||||||
|
|
||||||
|
// CreateFileW is inherently O_CLOEXEC by default.
|
||||||
|
options &= ~O_CLOEXEC;
|
||||||
|
|
||||||
switch (options) {
|
switch (options) {
|
||||||
case O_RDONLY:
|
case O_RDONLY:
|
||||||
desiredAccess = GENERIC_READ;
|
desiredAccess = GENERIC_READ;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue