]> git.itanic.dy.fi Git - rrdd/commitdiff
main: Exit on init_jobcontrol failure
authorTimo Kokkonen <timo.t.kokkonen@iki.fi>
Sat, 12 May 2012 19:41:43 +0000 (22:41 +0300)
committerTimo Kokkonen <timo.t.kokkonen@iki.fi>
Sat, 12 May 2012 19:41:43 +0000 (22:41 +0300)
If we fail to initialize critical structures, there is no point in
proceeding any further.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
main.c

diff --git a/main.c b/main.c
index 9bb12f7ceb96c514a8e0ee511d130d5cc1260402..5ca5e3e3cca21d5c28e97a40bebb6c01ddc66051 100644 (file)
--- a/main.c
+++ b/main.c
@@ -54,7 +54,8 @@ int main(int argc, char *argv[])
 
        rrdtool_create_missing_databases(all_rrds);
 
-       init_jobcontrol(opts.max_jobs);
+       if (init_jobcontrol(opts.max_jobs))
+               return -1;
 
        while (1) {
                pr_info("loop start\n");