reopen /dev/tty and feed into stdin with dup2. add -o reopen flag.