<p>I would like to be able to spawn a linux process that would only have access to stdin, stdout, and stderr (nothing more and nothing less). Can I do this at the process level itself? I am also implicitly stating (oxymoron) that I don't want the spawned process to be able to change the "thing" that the other end of the stream points to. </p>

<p>Metaphorically:</p>

<ul>
<li>the process has a input pipe that comes from somewhere, it cannot change where the pipe starts from, so it cannot control where input comes from.</li>
<li>the process has output and error pipes that go somewhere, it cannot change where the other end of the output pipes point to, so it cannot control where output goes to.</li>
<li>it cannot create any new pipes.</li>
</ul>

<p>I am also currently looking at SElinux. Would this allow me to create a process that only had access to these three streams? Thank you.</p>

If you're root, you can chroot to a directory, drop privileges so that you no longer have filesystem write access, then exec.  That will prevent a program from creating new files.  But there's no way to prevent a program from creating pipes and sockets (well, no-sockets is possible with SELinux), and there's no way to prevent a program from rearranging and closing its file descriptors.
Well, I suppose you could use
```
ptrace
```
to trap all syscalls, and only allow the ones that you approve of, so when I say "there's no way" I mean "there's no easy way".  This incurs a noticable overhead, but if you're careful enough you can make it secure.  The
```
strace
```
or
UMview
projects may be good starting points if you decide to go down this path.