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 &quot;--enabled_chdir_daemon&quot; to add the value 1 to daemon() function ?<br>
</blockquote>
<br></div>
I&#39;ve just added a &#39;-n&#39; command line switch that, in pseudo-diff syntax :), does the following:<br>
<br>
+        case &#39;n&#39;:   /* don&#39;t chdir in daemon mode */<br>
+            ctx-&gt;nochdir = 1;<br>
+            break;<br>
+<br>
<br>
     /* daemonize if not -F */<br>
     if(ctx-&gt;daemon &amp;&amp; !ctx-&gt;cgi)<br>
-        con_err_ifm(daemon(0, 0), &quot;daemon error&quot;);<br>
+        con_err_ifm(daemon(ctx-&gt;nochdir, 0), &quot;daemon error&quot;);<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&#39;t it ?<br clear="all"></blockquote></div>Yes, it&#39;s sure, it&#39;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>