summaryrefslogtreecommitdiff
path: root/ripd
diff options
context:
space:
mode:
Diffstat (limited to 'ripd')
-rw-r--r--ripd/rip_main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ripd/rip_main.c b/ripd/rip_main.c
index 0b29107d..57b5f3af 100644
--- a/ripd/rip_main.c
+++ b/ripd/rip_main.c
@@ -292,8 +292,11 @@ main (int argc, char **argv)
return (0);
/* Change to the daemon program. */
- if (daemon_mode)
- daemon (0, 0);
+ if (daemon_mode && daemon (0, 0) < 0)
+ {
+ zlog_err("RIPd daemon failed: %s", strerror(errno));
+ exit (1);
+ }
/* Pid file create. */
pid_output (pid_file);