[Klone-users] Use relative paths in kloned.conf

thomas fossati tho at koanlogic.com
Fri Oct 23 10:01:40 EDT 2009


Hi Mickael,

On Jul 21, 2009, at 4:42 PM, Mickael Auger wrote:
> We wish have the possibilty to call daemon() with daemon(1, 0).
>
> ** My question : **
>
> Could you offer us an option in the main makefile as "-- 
> enabled_chdir_daemon" to add the value 1 to daemon() function ?

I've just added a '-n' command line switch that, in pseudo-diff  
syntax :), does the following:

+        case 'n':   /* don't chdir in daemon mode */
+            ctx->nochdir = 1;
+            break;
+

      /* daemonize if not -F */
      if(ctx->daemon && !ctx->cgi)
-        con_err_ifm(daemon(0, 0), "daemon error");
+        con_err_ifm(daemon(ctx->nochdir, 0), "daemon error");

That should both solve your problem and be a little more flexible than  
a setting which is performed once at configuration-time.  Isn't it ?

ciao, t.




More information about the klone-users mailing list