Subprocess Isolation in Python
<p>I am currently working on a personal project where I have to run two processes simultaneously. The problem is that I have to isolate each of them (they cannot communicate between them or with my system) and I must be able to control their stdin, stdout and stderr. Is there anyway I can achieve this?</p>

<p>Thank you!</p>

<p>A combination of <code>os.setuid()</code>, <code>os.setgid()</code> and <code>os.setgroups()</code> (also maybe <code>os.chroot()</code>) is a good solution.</p>

python subprocess chroot isolation