diff --git a/src/config.c b/src/config.c index cbb7281..f50872d 100644 --- a/src/config.c +++ b/src/config.c @@ -156,7 +156,7 @@ conf_misc_section(void) conf.pad = pad; - if(conf.status_timing <= 0) + if(conf.status_timing < 0) { warnx("configuration : status_timing value (%d) incorrect.", conf.status_timing); conf.status_timing = 1; diff --git a/src/wmfs.c b/src/wmfs.c index 9464a6c..5705126 100644 --- a/src/wmfs.c +++ b/src/wmfs.c @@ -148,11 +148,11 @@ thread_process(void *arg) /* Status checking loop with timing */ else { - while(!exiting) + do { spawn(conf.status_path); sleep(conf.status_timing); - } + } while (!exiting && conf.status_timing != 0); pthread_exit(0); }