| If run in foreground, imply standard output as log destination. - geomyidae - A… | |
| git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfri… | |
| Log | |
| Files | |
| Refs | |
| Tags | |
| README | |
| LICENSE | |
| --- | |
| commit 621a10e4ba30b33ef351d52ac5ff37b55458d96b | |
| parent d3b90fd7b38feae19f7e6192cd15051abfed45d7 | |
| Author: Christoph Lohmann <[email protected]> | |
| 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(-) | |
| --- | |
| 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) | |
| 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)); |