use select to merge pty master side io