[Xfce4-commits] [xfce/xfwm4] 01/03: Remove daemon mode

noreply at xfce.org noreply at xfce.org
Mon Jun 15 21:39:15 CEST 2015


This is an automated email from the git hooks/post-receive script.

olivier pushed a commit to branch master
in repository xfce/xfwm4.

commit 43e76c7bdfa6db6bf95f576723dc5e41cc15f59e
Author: Olivier Fourdan <fourdan at xfce.org>
Date:   Mon Jun 15 20:46:00 2015 +0200

    Remove daemon mode
    
    This is causing all sort of weird bugs and issues.
    
    Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
---
 src/main.c |   31 -------------------------------
 1 file changed, 31 deletions(-)

diff --git a/src/main.c b/src/main.c
index fbf5656..129b70c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -613,11 +613,7 @@ main (int argc, char **argv)
 #endif
     GOptionEntry option_entries[] =
     {
-#ifdef HAVE_DAEMON
-        { "daemon", '\0', 0, G_OPTION_ARG_NONE, &daemon_mode, N_("Fork to the background"), NULL },
-#else
         { "daemon", '\0', 0, G_OPTION_ARG_NONE, &daemon_mode, N_("Fork to the background (not supported)"), NULL },
-#endif
 #ifdef HAVE_COMPOSITOR
         { "compositor", '\0', 0, G_OPTION_ARG_CALLBACK, compositor_callback, N_("Set the compositor mode"), "on|off|auto" },
 #else
@@ -677,33 +673,6 @@ main (int argc, char **argv)
             break;
         case 0:
         case 1:
-            if (daemon_mode)
-            {
-#ifdef HAVE_DAEMON
-                if (daemon (TRUE, TRUE) < 0)
-                {
-                        g_warning ("Failed to enter daemon mode: %s", g_strerror(errno));
-                        exit(EXIT_FAILURE);
-                }
-#else /* !HAVE_DAEMON */
-                switch (fork ())
-                {
-                    case -1:
-                        g_warning ("Failed to create new process: %s", g_strerror(errno));
-                        exit (1);
-                        break;
-                    case 0:    /* child */
-#ifdef HAVE_SETSID
-                        /* detach from terminal session */
-                        (void)setsid();
-#endif /* !HAVE_SETSID */
-                        break;
-                    default:   /* parent */
-                        _exit (0);
-                        break;
-                }
-#endif /* !HAVE_DAEMON */
-            }
             /* enter GTK main loop */
             gtk_main ();
             break;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list