summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: eb0a6f7)
raw | patch | inline | side by side (parent: eb0a6f7)
author | Sebastian Harl <sh@tokkee.org> | |
Thu, 5 Dec 2013 17:39:03 +0000 (18:39 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Thu, 5 Dec 2013 17:39:03 +0000 (18:39 +0100) |
It doesn't really matter much what the default is but -d should be reserved
for debugging.
for debugging.
doc/sysdbd.1.txt | patch | blob | history | |
src/daemon/sysdbd.c | patch | blob | history |
diff --git a/doc/sysdbd.1.txt b/doc/sysdbd.1.txt
index 019ad9792192a525716f2647cd6cdc18f84a53cf..ae6ec1880725ef5d10b75cd55ddae68fe4e7ad6f 100644 (file)
--- a/doc/sysdbd.1.txt
+++ b/doc/sysdbd.1.txt
The main configuration file. This file defines the behavior of *sysdbd* by
specifying default settings and the plugins to be loaded.
-*-d*::
- Daemonize on startup: Start *sysdbd* as a background process detached from
- the current terminal and session.
+*-D*::
+ Do not daemonize on startup: Rather than starting *sysdbd* as a background
+ process detached from the current terminal and session (the default), run
+ the process in the foreground. This allows easy monitoring of *sysdbd*.
*-h*::
Display a usage and help summary and exit.
diff --git a/src/daemon/sysdbd.c b/src/daemon/sysdbd.c
index 2f2afa249505b79bcfc76d10169272e6b7fcef06..16cac49445daeccf032cc42bce89f6a7ce2c47d2 100644 (file)
--- a/src/daemon/sysdbd.c
+++ b/src/daemon/sysdbd.c
"\nOptions:\n"
" -C FILE the main configuration file\n"
" default: "CONFIGFILE"\n"
-" -d run in background (daemonize)\n"
+" -D do not run in background (daemonize)\n"
"\n"
" -h display this help and exit\n"
" -V display the version number and copyright\n"
main(int argc, char **argv)
{
char *config_filename = NULL;
- _Bool do_daemonize = 0;
+ _Bool do_daemonize = 1;
pthread_t backend_thread;
int status;
while (42) {
- int opt = getopt(argc, argv, "C:dhV");
+ int opt = getopt(argc, argv, "C:DhV");
if (-1 == opt)
break;
case 'C':
config_filename = optarg;
break;
- case 'd':
- do_daemonize = 1;
+ case 'D':
+ do_daemonize = 0;
break;
case 'h':