log if we exit bc another instance is up

This commit is contained in:
2026-07-10 12:21:13 +02:00
parent 5a055fb03e
commit 9afef7fbd8

View File

@@ -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