Hi Benjamin!<br><br>About the magic constant.<br><br>What about getdtablesize() &lt;<a href="http://opengroup.org/onlinepubs/007908775/xsh/getdtablesize.html">http://opengroup.org/onlinepubs/007908775/xsh/getdtablesize.html</a>&gt; instead?<br>
<br>... but actually SUS advises to use the getrlimit(RLIMIT_NOFILE) in new applications. Interesting.<br><br>cu.<br><br><div class="gmail_quote">On Mon, Jan 18, 2010 at 7:10 AM, Benjamin R. Haskell <span dir="ltr">&lt;<a href="mailto:distcc@benizi.com">distcc@benizi.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">&#39;paludis&#39; is a package manager for Gentoo Linux (and Exherbo).  I sent<br>
an email to the &#39;paludis&#39; users list about a problem with waiting for<br>
the distcc zeroconf daemon to stop.<br>
<br>
link: <a href="http://lists.pioto.org/pipermail/paludis-user/2010-January/001250.html" target="_blank">http://lists.pioto.org/pipermail/paludis-user/2010-January/001250.html</a><br>
<br>
I use &#39;distcc -j&#39; to set up my MAKEOPTS variable.  The problem is with a<br>
wrapper used to prefix output for paludis with a tag indicating its<br>
origin.  When using &#39;+zeroconf&#39; in DISTCC_HOSTS, paludis waits 20<br>
seconds for distcc unconditionally, because distcc doesn&#39;t close the<br>
extra file descriptors that are open due to this output munging.  (So,<br>
&#39;paludis&#39; waits on the grandchild daemon process that holds those fd&#39;s<br>
open.)<br>
<br>
I stated in that message that I feel like this is a problem with the way<br>
distcc daemonizes (and not with the way paludis wraps output).  I&#39;m not<br>
as certain of that as I felt a couple hours ago, but it still feels<br>
accurate (that the daemonizing process has the responsibility to close<br>
any open fd&#39;s it&#39;s not going to use).<br>
<br>
If so, it seems like a pretty easy fix (to just close more fd&#39;s than 0,<br>
1, and 2).  I can commit the attached patch if 1024 doesn&#39;t seem too<br>
magic-number-y (and I&#39;m not spouting nonsense).<br>
<br>
Best,<br>
Ben<br>__<br>
distcc mailing list            <a href="http://distcc.samba.org/" target="_blank">http://distcc.samba.org/</a><br>
To unsubscribe or change options:<br>
<a href="https://lists.samba.org/mailman/listinfo/distcc" target="_blank">https://lists.samba.org/mailman/listinfo/distcc</a><br></blockquote></div><br><br clear="all"><br>-- <br>Don&#39;t walk behind me, I may not lead.<br>
Don&#39;t walk in front of me, I may not follow.<br>Just walk beside me and be my friend.<br>    -- Albert Camus (attributed to)<br>