Yes. -----Original Message----- From: Lars Munch <[email protected]> Sent: Friday, 14 May 2021 18:20 To: Geva, Erez (ext) (DI PA DCP R&D 3) <[email protected]> Cc: [email protected] Subject: Re: [Linuxptp-devel] [PATCH 2/4] ts2phc: Close socket on peer shutdown
On Fri, May 14, 2021 at 4:24 PM Geva, Erez <[email protected]> wrote: > > Make sense to handle 0, end of file. > But as it is NOT an error, perhaps it should use a proper pr_info(). So something like this? cnt = read(pfd.fd, input, sizeof(input)); if (cnt <= 0) { if (cnt == 0) pr_info("disconnected from remote nmea source"); else pr_err("failed to read from nmea source"); close(pfd.fd); pfd.fd = -1; _______________________________________________ Linuxptp-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linuxptp-devel
