diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-05-17 22:24:31 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-05-17 22:24:31 +0200 |
commit | a2b9f2c732232200fd4822e34d60d4c7f5ad37d2 (patch) | |
tree | 590e83f11ea568349e523256606b7fbf0148dd14 /src/fastd.c | |
parent | d8a3a034a13aaabe5877c6b3cdf73e0582e6425f (diff) | |
download | fastd-a2b9f2c732232200fd4822e34d60d4c7f5ad37d2.tar fastd-a2b9f2c732232200fd4822e34d60d4c7f5ad37d2.zip |
Add daemon mode
Diffstat (limited to 'src/fastd.c')
-rw-r--r-- | src/fastd.c | 5 |
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) { |