<div dir="ltr">Chris,<div><br></div><div>   can you confirm?  If it does, I&#39;ll add it to the relevant readmes.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 16, 2015 at 11:39 AM, Levente Uzonyi <span dir="ltr">&lt;<a href="mailto:leves@elte.hu" target="_blank">leves@elte.hu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This should work, because the daemontools start script is executed by root. I assume that it&#39;s enough to the highest priority to 2, so the following should work:<br>
<br>
ulimit -r 2<br>
exec setuidgid &lt;account&gt; &lt;ht_vm_executable&gt; &lt;image&gt; ...<br>
<br>
Levente<span class=""><br>
<br>
On Wed, 15 Jul 2015, Eliot Miranda wrote:<br>
<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
Hi Chris,<br>
On Wed, Jul 15, 2015 at 9:17 AM, Chris Muller &lt;<a href="mailto:ma.chris.m@gmail.com" target="_blank">ma.chris.m@gmail.com</a>&gt; wrote:<br>
      On Sat, Jul 11, 2015 at 4:30 PM, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt; wrote:<br>
      &gt; Hi Chris,<br>
      &gt;<br>
      &gt;     I really know very little about this.  I don&#39;t understand the mechanism.  But I&#39;m told that the limits file takes effect on login.  i.e. if the file is created while a user is logged in it<br>
      won&#39;t take effect for that user until that user logs out and logs back in again and only applies to those sessions that logged in once the file had been created.  I /dont/ know whether su sets up<br>
      a new session.  i should try that experiment.<br>
      &gt;<br>
      &gt; So perhaps you could have daemon tools run login or su to create a new session and see if the ht version can be run by daemontools in that session.  Presumably daemons launched at boot aren&#39;t in<br>
      the right state.  (What an absurdity they&#39;ve invented here).<br>
<br>
      Good suggestion to try, unfortunately it didn&#39;t work.  I tried logging<br>
      in as root to see if it would &quot;initialize&quot; that account to have those<br>
      permissions, then logging out and starting the daemon.  Same error.<br>
<br>
<br>
See <a href="http://superuser.com/questions/454465/make-ulimits-work-with-start-stop-daemon" rel="noreferrer" target="_blank">http://superuser.com/questions/454465/make-ulimits-work-with-start-stop-daemon</a>.  Apparently<br>
<br>
&quot;At this time, you can&#39;t. limits.conf(5) is the configuration for pam_limits(8), which is activated by the PAM stack according to the configuration in /etc/pam.d. However, start-stop-daemon(8) as launched<br>
from an init.d script doesn&#39;t pass through the PAM stack, so those kinds of settings are never applied.<br>
<br></span>
Debian bug #302079 contains a patch to enable setting limits from start-stop-daemon(8), but the bug has been open since 2005 and the patch hasn&#39;t been merged yet.<span class=""><br>
<br>
While not ideal, AFAIK the recommended way to accomplish this right now is to add a ulimitcall in your init.d script.&quot;<br>
<br>
Looks like this is settable via ulimit -r; From man ulimit(1) (actually from bash (1))<br>
              -r     The maximum real-time scheduling priority<br>
<br>
Of course this may not work:<br>
<br>
ulimit -r 3$ <br>
-bash: ulimit: real-time priority: cannot modify limit: Operation not permitted<br>
<br>
But it&#39;s worth a try.<br>
<br>
      For the sake of progress, I&#39;ve switched to using the ITHB vm.<br>
<br>
<br>
--<br>
best,Eliot<br>
<br>
</span></blockquote>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div>