aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--marsond.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/marsond.c b/marsond.c
index b94883b..00ac139 100644
--- a/marsond.c
+++ b/marsond.c
@@ -112,7 +112,8 @@ void lock_memory(void) {
if(mlockall(MCL_CURRENT) >= 0) {
debug("mlockall() succeeded");
} else {
- warn("can't lock memory: %s", strerror(errno));
+ if(foreground)
+ warn("can't lock memory: %s", strerror(errno));
}
}
@@ -122,7 +123,8 @@ void set_realtime(void) {
if(setpriority(PRIO_PROCESS, 0, -20) >= 0) {
debug("setpriority() succeeded");
} else {
- warn("can't setpriority(): %s", strerror(errno));
+ if(foreground)
+ warn("can't setpriority(): %s", strerror(errno));
}
}