Fixed pty::childexited exception problem