RFR [XS] : 8205416 : windows: fix checking of CloseHandle return code in Java_java_io_FileCleanable_cleanupClose0
Baesken, Matthias
matthias.baesken at sap.com
Wed Jun 20 12:09:21 UTC 2018
Please review this small fix for a return code handling of windows function CloseHandle .
MSDN documents CloseHandle here : https://msdn.microsoft.com/de-de/library/windows/desktop/ms724211(v=vs.85).aspx
....
Return value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError<https://msdn.microsoft.com/de-de/library/windows/desktop/ms679360(v=vs.85).aspx>.
However until this patch, Java_java_io_FileCleanable_cleanupClose0
Checked for return code -1 of CloseHandle in error cases .
Bug:
https://bugs.openjdk.java.net/browse/JDK-8205416
Webrev :
http://cr.openjdk.java.net/~mbaesken/webrevs/8205416/
Thanks, Matthias
More information about the core-libs-dev
mailing list