From 9afef7fbd8a9358d9daac8983fb88f2e6a75bc05 Mon Sep 17 00:00:00 2001 From: drath Date: Fri, 10 Jul 2026 12:21:13 +0200 Subject: [PATCH] log if we exit bc another instance is up --- src/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 100f914..036a50e 100644 --- a/src/main.c +++ b/src/main.c @@ -176,8 +176,10 @@ int main(void) { applog(LOG_DBG, "Compiled with %s", C_STD); /* see if another instance is up, quit if it is */ - if (get_instance_lock() < 0) + if (get_instance_lock() < 0) { + applog(LOG_ERR, "Another instance is already running. Exiting."); return 0; + } /* malloc memory for the struct */ struct sensors_t *sensors = malloc(sizeof(*sensors)); // no actual point in mallocing and it is ever so sligtly slower to access heap vs stack, but its cool