Work around odd pause-before-exit bug; rearrange exit logic to avoid possible race.
Work around odd pause-before-exit bug; rearrange exit logic to avoid possible race.

pmahoney/console-mux,pmahoney/console-mux