set echo on master_fd first (linux, osx); then child_fd.
support echo=False on Mac