diff options
Diffstat (limited to 'zebra/main.c')
-rw-r--r-- | zebra/main.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/zebra/main.c b/zebra/main.c index 2d6a4ac8..d829c046 100644 --- a/zebra/main.c +++ b/zebra/main.c @@ -362,8 +362,11 @@ main (int argc, char **argv) exit (0); /* Daemonize. */ - if (daemon_mode) - daemon (0, 0); + if (daemon_mode && daemon (0, 0) < 0) + { + zlog_err("Zebra daemon failed: %s", strerror(errno)); + exit (1); + } /* Output pid of zebra. */ pid_output (pid_file); |