From 1db30f2eba7cc678a9a83287667d8d207474a4ba Mon Sep 17 00:00:00 2001 From: Drath Date: Mon, 25 May 2026 11:19:16 +0000 Subject: [PATCH] ig systemd could restart it if it exits with 0 --- src/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index 92fa58d..45721e2 100644 --- a/src/main.c +++ b/src/main.c @@ -175,14 +175,14 @@ int main(void) { /* see if another instance is up, quit if it is */ if (get_instance_lock() < 0) - return 1; + 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 if (sensors == NULL) { applog(LOG_ERR, "can't allocate mem for the sensor struct. You don't got %lu bytes bro?", sizeof(struct sensors_t)); free(sensors); - return 2; + return 1; } applog(LOG_INF, "sensor struct allocated, size is %lu bytes", sizeof(struct sensors_t));