all: check return value from daemon() call
* */*main.c: (main) Current versions of Gcc warn if the return value for
daemon() is not checked. So add a simple test and exit on failure.
diff --git a/isisd/isis_main.c b/isisd/isis_main.c
index 2411518..c5e824c 100644
--- a/isisd/isis_main.c
+++ b/isisd/isis_main.c
@@ -333,8 +333,11 @@
return(0);
/* demonize */
- if (daemon_mode)
- daemon (0, 0);
+ if (daemon_mode && daemon (0, 0) < 0)
+ {
+ zlog_err("ISISd daemon failed: %s", strerror(errno));
+ exit (1);
+ }
/* Process ID file creation. */
pid_output (pid_file);