OSDN Git Service

obexd: Don't daemonize and just toggle foreground logging
authorMarcel Holtmann <marcel@holtmann.org>
Mon, 10 Dec 2012 22:16:49 +0000 (23:16 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 10 Dec 2012 22:16:49 +0000 (23:16 +0100)
obexd/src/main.c

index e39f00c..af31736 100644 (file)
@@ -158,7 +158,7 @@ static gboolean parse_debug(const char *key, const char *value,
 static GOptionEntry options[] = {
        { "nodaemon", 'n', G_OPTION_FLAG_REVERSE,
                                G_OPTION_ARG_NONE, &option_detach,
-                               "Don't run as daemon in background" },
+                               "Run with logging in foreground" },
        { "debug", 'd', G_OPTION_FLAG_OPTIONAL_ARG,
                                G_OPTION_ARG_CALLBACK, parse_debug,
                                "Enable debug information output", "DEBUG" },
@@ -268,13 +268,6 @@ int main(int argc, char *argv[])
 
        g_option_context_free(context);
 
-       if (option_detach == TRUE) {
-               if (daemon(0, 0)) {
-                       perror("Can't start daemon");
-                       exit(1);
-               }
-       }
-
        __obex_log_init("obexd", option_debug, option_detach);
 
        DBG("Entering main loop");