If run in foreground, imply standard output as log destination. - geomyidae - A small C-based gopherd.
HTML git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/geomyidae/
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
DIR LICENSE
---
DIR commit 621a10e4ba30b33ef351d52ac5ff37b55458d96b
DIR parent d3b90fd7b38feae19f7e6192cd15051abfed45d7
HTML Author: Christoph Lohmann <20h@r-36.net>
Date: Thu, 24 Nov 2016 22:18:36 +0100
If run in foreground, imply standard output as log destination.
Diffstat:
M geomyidae.8 | 3 ++-
M main.c | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
---
DIR diff --git a/geomyidae.8 b/geomyidae.8
@@ -86,7 +86,8 @@ Only use IPv4.
Only use IPv6.
.
.It Fl d
-Don't fork into background
+Don't fork into background. If no log file is given, this implies logging to
+the standard output.
.
.It Fl l Ar logfile
Specify file where log output is written (no default)
DIR diff --git a/main.c b/main.c
@@ -387,6 +387,8 @@ main(int argc, char *argv[])
perror("initlogging");
return 1;
}
+ } else if(!dofork) {
+ glfd = 0;
}
memset(&hints, 0, sizeof(hints));