URI: 
       tAdd command line argument to prevent daemonizing - ltk - Socket-based GUI for X11 (WIP)
  HTML git clone git://lumidify.org/ltk.git (fast, but not encrypted)
  HTML git clone https://lumidify.org/git/ltk.git (encrypted, but very slow)
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
   DIR commit b9b73721a1cc87c9a6b8d68f0529e2c273f3440a
   DIR parent 1d97676cf31728fbc5a9dd798da1f6ba1b0f9618
  HTML Author: lumidify <nobody@lumidify.org>
       Date:   Sun, 22 May 2022 21:16:12 +0200
       
       Add command line argument to prevent daemonizing
       
       Diffstat:
         M src/ltkd.c                          |      10 ++++++++--
       
       1 file changed, 8 insertions(+), 2 deletions(-)
       ---
   DIR diff --git a/src/ltkd.c b/src/ltkd.c
       t@@ -102,6 +102,8 @@ static ltk_timer *timers = NULL;
        static size_t timers_num = 0;
        static size_t timers_alloc = 0;
        
       +static int daemonize_flag = 1;
       +
        static int ltk_mainloop(ltk_window *window);
        static char *get_sock_path(char *basedir, Window id);
        static FILE *open_log(char *dir);
       t@@ -139,11 +141,14 @@ static ltk_window *main_window = NULL;
        int main(int argc, char *argv[]) {
                int ch;
                char *title = "LTK Window";
       -        while ((ch = getopt(argc, argv, "t:")) != -1) {
       +        while ((ch = getopt(argc, argv, "dt:")) != -1) {
                        switch (ch) {
                                case 't':
                                        title = optarg;
                                        break;
       +                        case 'd':
       +                                daemonize_flag = 0;
       +                                break;
                                default:
                                        ltk_fatal("USAGE: ltkd [-t title]\n");
                        }
       t@@ -197,7 +202,8 @@ ltk_mainloop(ltk_window *window) {
        
                printf("%lu", window->xwindow);
                fflush(stdout);
       -        daemonize();
       +        if (daemonize_flag)
       +                daemonize();
        
                /* FIXME: make time management smarter - maybe always figure out how long
                   it will take until the next timer is due and then sleep if no other events