summaryrefslogtreecommitdiff
path: root/ripngd/ripng_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'ripngd/ripng_main.c')
-rw-r--r--ripngd/ripng_main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ripngd/ripng_main.c b/ripngd/ripng_main.c
index f174610d..85209a15 100644
--- a/ripngd/ripng_main.c
+++ b/ripngd/ripng_main.c
@@ -288,8 +288,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("RIPNGd daemon failed: %s", strerror(errno));
+ exit (1);
+ }
/* Create VTY socket */
vty_serv_sock (vty_addr, vty_port, RIPNG_VTYSH_PATH);