aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/process.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2025-01-10 10:58:26 +0100
committerDan Engelbrecht <[email protected]>2025-01-10 10:58:26 +0100
commitd2669359113583e6329764e5bfebaa0b22731a8e (patch)
treea95564efd7d0db2e8f0e65592704cd9678545968 /src/zencore/process.cpp
parentremove ServiceLevel (diff)
downloadzen-d2669359113583e6329764e5bfebaa0b22731a8e.tar.xz
zen-d2669359113583e6329764e5bfebaa0b22731a8e.zip
if we can't open a process handle, assume it is running under other user id
Diffstat (limited to 'src/zencore/process.cpp')
-rw-r--r--src/zencore/process.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/zencore/process.cpp b/src/zencore/process.cpp
index 11273a2b9..3d6a67ada 100644
--- a/src/zencore/process.cpp
+++ b/src/zencore/process.cpp
@@ -806,6 +806,11 @@ IsProcessRunning(int pid, std::error_code& OutEc)
{
return false;
}
+ if (Error == ERROR_ACCESS_DENIED)
+ {
+ // Process is running under other user probably, assume it is running
+ return true;
+ }
OutEc = MakeErrorCode(Error);
return false;
}