posix: posix_openpt, openpty functions
TUI: use posix_openpt to open each terminal's psuedo-terminal master