added /* block until all data sent */
            rc = tcdrain(fd);