adb: win32: fix regression on older versions of Windows
On Windows 7, GetStdHandle() may return console pseudo-handles. If you
call SetHandleInformation(h, HANDLE_FLAG_INHERIT, 0) on such a handle,
it will fail. These failures should be ignored like the old code.
Newer versions of Windows return real handles that don't have this
issue. Console pseudo-handles can apparently be identified by the values
3, 7, 11.
This is a regression from 2122c7a1483dc6050b33f58fad4a15d5acd79fdd.
https://code.google.com/p/android/issues/detail?id=186599
Change-Id: I287a74a81d37e0ebe62d673a3f5651ee5439c0d2
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
1 file changed