mdbx-windows: interpret ERROR_ACCESS_DENIED from OpenProcess() as 'process exists'.

Change-Id: I22e3e3d3d72531e76848793f1e3522d0c1767618
This commit is contained in:
Leonid Yuriev 2019-12-13 16:17:31 +03:00
parent bf6d09a878
commit 76099d951c

View File

@ -613,6 +613,10 @@ MDBX_INTERNAL_FUNC int mdbx_rpid_check(MDBX_env *env, uint32_t pid) {
case WAIT_OBJECT_0:
/* process just exited */
return MDBX_RESULT_FALSE;
case ERROR_ACCESS_DENIED:
/* The ERROR_ACCESS_DENIED would be returned for CSRSS-processes, etc.
* assume pid exists */
return MDBX_RESULT_TRUE;
case WAIT_TIMEOUT:
/* pid running */
return MDBX_RESULT_TRUE;