From c264ac96e5b149bba6c1ca686ee4090f9c4e01d9 Mon Sep 17 00:00:00 2001 From: bythos14 <45720552+bythos14@users.noreply.github.com> Date: Fri, 28 Apr 2023 22:31:53 -0400 Subject: [PATCH] Add more error messages for directory locking Avoid misreporting the presence of another instance of BOINC --- client/main.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/client/main.cpp b/client/main.cpp index ca2ffa3b522..0c10f5827e5 100644 --- a/client/main.cpp +++ b/client/main.cpp @@ -343,7 +343,13 @@ static int initialize() { if (!cc_config.allow_multiple_clients) { retval = wait_client_mutex(".", 10); if (retval) { - log_message_error("Another instance of BOINC is running."); + if (retval == ERR_ALREADY_RUNNING) { + log_message_error("Another instance of BOINC is running."); + } else if (retval == ERR_OPEN) { + log_message_error("Failed to open lockfile. Check file/directory permissions."); + } else { + log_message_error("Failed to lock directory.", retval); + } return ERR_EXEC; } }