summaryrefslogtreecommitdiff
path: root/zebra/test_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/test_main.c')
-rw-r--r--zebra/test_main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/zebra/test_main.c b/zebra/test_main.c
index e186fea6..4398a389 100644
--- a/zebra/test_main.c
+++ b/zebra/test_main.c
@@ -308,8 +308,11 @@ main (int argc, char **argv)
exit (0);
/* Daemonize. */
- if (daemon_mode)
- daemon (0, 0);
+ if (daemon_mode && daemon (0, 0) < 0)
+ {
+ perror("daemon start failed");
+ exit (1);
+ }
/* Needed for BSD routing socket. */
pid = getpid ();