fix possible deadlock when running under non-threaded rts. Ignore-this: 408900091b550beccce1f47e2064439f The problem was that without the threaded rts, we wouldn't call the consumer threads that were created to eat up stdout and stderr, which results in a deadlock if the buffer fills up and the process stops executing.  So now we dump stdout and stderr to the log file first (which doesn't block).  We still need the helper threads, since err could fill up before we finish writing out.
fix possible deadlock when running under non-threaded rts.
Ignore-this: 408900091b550beccce1f47e2064439f
The problem was that without the threaded rts, we wouldn't call the
consumer threads that were created to eat up stdout and stderr, which
results in a deadlock if the buffer fills up and the process stops
executing.  So now we dump stdout and stderr to the log file first (which
doesn't block).  We still need the helper threads, since err could fill up
before we finish writing out.

droundy/franchise