summaryrefslogtreecommitdiffstats
path: root/src/fastd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fastd.c')
-rw-r--r--src/fastd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/fastd.c b/src/fastd.c
index 0ea9e26..e270a26 100644
--- a/src/fastd.c
+++ b/src/fastd.c
@@ -671,6 +671,11 @@ int main(int argc, char *argv[]) {
init_peers(&ctx);
+ if (conf.daemon) {
+ if (daemon(0, 1) < 0)
+ exit_errno(&ctx, "daemon");
+ }
+
on_up(&ctx);
while (!terminate) {