summaryrefslogtreecommitdiffstats
path: root/src/ulogd.c
diff options
context:
space:
mode:
authorEric Leblond <eric@inl.fr>2008-11-29 15:10:25 +0100
committerEric Leblond <eric@inl.fr>2008-12-09 01:19:25 +0100
commita2f317e7d764f54bc51d3962ed1761358bfa10d9 (patch)
tree53307eff40968598051c819b817caa299a12d0db /src/ulogd.c
parentc9ec742b8f60be9d0a2ae892f4143123bc3bb2ba (diff)
Treat nice function return.
gcc was warning that the return of the nice function should be treated. This patch adds an error message in case of failure.
Diffstat (limited to 'src/ulogd.c')
-rw-r--r--src/ulogd.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ulogd.c b/src/ulogd.c
index e69079d..ead35b5 100644
--- a/src/ulogd.c
+++ b/src/ulogd.c
@@ -1129,7 +1129,13 @@ int main(int argc, char* argv[])
}
}
- nice(-1);
+ errno = 0;
+ if (nice(-1) == -1) {
+ if (errno != 0)
+ ulogd_log(ULOGD_ERROR, "Could not nice process: %s\n",
+ strerror(errno));
+ }
+
if (daemonize){
if (fork()) {