v23tests, modules and exec: make stdin redirection work and start work towards fixing https://github.com/veyron/release-issues/issues/1157

- stdin redirection was implemented in v23tests by firing of a goroutine
  to read from an io.Reader and copy it to the child processes' stdin.
  This is both fundamentally racy and inefficient. It's racy because
  there is no guarantee that the goroutine will start reading and
  writing before the child process has already read from its original
  stdin, before the goroutine has even started. This is how I
  ran into the problem. The race is fixed by changing lower level
  APIs so that stdin can be correctly configured before the child
  process starts.
- as explained in 1157, we need to distinguish between vanadium
  child processes and non-vanadium ones, and to only engage
  with the vanadium exec protocol with child processes that
  we trust and that implement the protocol. I plan to change the
  v23test and lower level APIs to support this in a followup CL.
  This cl just makes a first step towards this, but is far from
  complete.

Change-Id: Id01ea237bc1670071bb1893d67e057eac092f553
5 files changed
tree: 3e606f89c3da3c082f1150282bffb483f08c833e
  1. lib/
  2. profiles/
  3. runtimes/
  4. security/
  5. services/
  6. tools/