summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/main.c b/tests/main.c
index edc3b2de..e0fbb4d5 100644
--- a/tests/main.c
+++ b/tests/main.c
@@ -174,8 +174,11 @@ main (int argc, char **argv)
sort_node ();
/* Change to the daemon program. */
- if (daemon_mode)
- daemon (0, 0);
+ if (daemon_mode && daemon (0, 0) < 0)
+ {
+ fprintf(stderr, "daemon failed: %s", strerror(errno));
+ exit (1);
+ }
/* Create VTY socket */
vty_serv_sock (vty_addr, vty_port, "/tmp/.heavy.sock");