If run in foreground, imply standard output as log destination. - geomyidae - A small C-based gopherd. (DIR) Log (DIR) Files (DIR) Refs (DIR) README (DIR) LICENSE --- (DIR) commit 621a10e4ba30b33ef351d52ac5ff37b55458d96b (DIR) parent d3b90fd7b38feae19f7e6192cd15051abfed45d7 (HTM) 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: geomyidae.8 | 3 ++- 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 +tthe 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));