How to create an execve() child process with the right tty settings to run 'vi' yet still redirect IO back to the parent process?

view story

http://unix.stackexchange.com – How do I get a forked, execve() child process that can run 'vi', etc and redirect all IO to the parent process? I'm trying to pass shells through from an embedded Linux process to the PC software interface connected over the network. The IO for the shell process is packaged into app-specific messages for network transport over our existing protocol. First, I was just redirecting IO using simply pipe2(), fork(), dup2(), & execve(). This didn't give me a tty on the remote side... so 'screen', etc didn't work. Now, I'm using 'forkpty', and 'screen' mostly works... but many many other don' (HowTos)