From 76099d951c4e620c3df45df5e28e148aea968daf Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Fri, 13 Dec 2019 16:17:31 +0300 Subject: [PATCH] mdbx-windows: interpret ERROR_ACCESS_DENIED from OpenProcess() as 'process exists'. Change-Id: I22e3e3d3d72531e76848793f1e3522d0c1767618 --- src/elements/lck-windows.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/elements/lck-windows.c b/src/elements/lck-windows.c index 5d74bb8c..282f67d9 100644 --- a/src/elements/lck-windows.c +++ b/src/elements/lck-windows.c @@ -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;