Don't send stdin data if we're the host of the terminal. Re-arrange code to early return.