title: execveat(2) / fexecve(3) like behavior with Python’s subprocess
body: <p>How can I get Python’s <em>subprocess</em> module to accept an fd
  instead of a path (== <em>execveat()</em> with <code>AT_EMPTY_PATH</code>)?
  Example:</p>
  
  <pre><code>subprocess.Popen (["argv0", "argv1"], shell=False,
                    executable=os.open ("/proc/self/exe",
                                        os.O_RDONLY
                                        | os.O_CLOEXEC))
  </code></pre>
  
  <p>With Python 3.6.5 this fails on account of TypeError.</p>
  
  <p>The goal is, of course, avoiding the TOCTTOU between validating
  the binary and the call to <em>execve(2)</em>.</p>
  
  <p>I’m aware that <em>os.execve()</em> can be used with fds too but I’d
  prefer not to reimplement the <em>subprocess</em> module on top of that.</p>