log if we exit bc another instance is up
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user