From: Christian Franke <[email protected]>

The other daemons in Quagga exit with an error if they cannot fork.
Change isisd to behave consistently.

Signed-off-by: Christian Franke <[email protected]>
---
 isisd/isis_main.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/isisd/isis_main.c b/isisd/isis_main.c
index 3a73087..02ea0d7 100644
--- a/isisd/isis_main.c
+++ b/isisd/isis_main.c
@@ -355,8 +355,11 @@ main (int argc, char **argv, char **envp)
     return(0);
   
   /* demonize */
-  if (daemon_mode)
-    daemon (0, 0);
+  if (daemon_mode && daemon (0, 0) < 0)
+    {
+      zlog_err("IS-IS daemon failed: %s", strerror(errno));
+      exit (1);
+    }
 
   /* Process ID file creation. */
   if (pid_file[0] != '\0')
-- 
2.8.0


_______________________________________________
Quagga-dev mailing list
[email protected]
https://lists.quagga.net/mailman/listinfo/quagga-dev

Reply via email to