Hi Thomas,<br><br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
We wish have the possibilty to call daemon() with daemon(1, 0).<br>
<br>
** My question : **<br>
<br>
Could you offer us an option in the main makefile as "--enabled_chdir_daemon" to add the value 1 to daemon() function ?<br>
</blockquote>
<br></div>
I've just added a '-n' command line switch that, in pseudo-diff syntax :), does the following:<br>
<br>
+ case 'n': /* don't chdir in daemon mode */<br>
+ ctx->nochdir = 1;<br>
+ break;<br>
+<br>
<br>
/* daemonize if not -F */<br>
if(ctx->daemon && !ctx->cgi)<br>
- con_err_ifm(daemon(0, 0), "daemon error");<br>
+ con_err_ifm(daemon(ctx->nochdir, 0), "daemon error");<br>
<br>
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 ?<br clear="all"></blockquote></div>Yes, it's sure, it's a good solution.<br>
Do you have a patch for me :) to test it ?<br><br>Thanks.<br><br>-- <br>Mickaël AUGER<br><br>