Change resources available to the processes from Python
<p>Is there a way to change resources available to a running process from <code>Python</code>? Namely I would like to change <code>Max open files</code> <code>soft</code>:<code>hard</code> limit.</p>

<p>I know I can use <code>ulimit -n 1024000</code> and spawn process from that shell, but that would require stopping that process beforehand.</p>

<p>I'm also aware of <code>prlimit</code>, but it's not available in <code>Wheezy 7.6</code> with <code>util-linux 2.20.1-5.3</code>.</p>

<p>Python <code>resource</code> module apparently allows changing limits just for itself...</p>

<p>I have found the following <a href="https://gregchapple.com/updating-ulimit-on-running-linux-process/" rel="nofollow">blog article</a>, which explains how to do it with <code>gdb</code> and I'm just hoping that something similar exists in <code>Python</code>.</p>

<p>Essentially I think I'm asking how to make <code>setrlimit</code> system-call for a running process from the Python program.</p>