title: What system calls to block/allow/inspect to create a program supervisor
body: <p>as per <a href="https://stackoverflow.com/questions/3642370/using-ptrace-to-write-a-program-supervisor-in-userspace">Using ptrace to write a program supervisor in userspace</a>, I'm attempting to create the program supervisor component of an online judge.</p>
  
  <p>What system calls would I need to block totally, always allow or check the attributes of to:</p>
  
  <ul>
  <li>Prevent forking or runing other commands</li>
  <li>Restrict to standard 'safe' C and C++ libs</li>
  <li>Prevent net access</li>
  <li>Restrict access to all but 2 files 'in.txt' and 'out.txt'</li>
  <li>Prevent access to any system functions or details.</li>
  <li>Prevent the application from escaping its supervisor</li>
  <li>Prevent anything nasty.</li>
  </ul>
  
  <p>Thanks any help/advice/links much appreciated.</p>