On Wed, Sep 14, 2016 at 10:58:30AM -0600, Jason Gunthorpe wrote: > On Wed, Sep 14, 2016 at 07:35:42PM +0300, Yishai Hadas wrote: > > >+ if (read(sockfd, msg, sizeof msg) != sizeof msg || > > >+ write(sockfd, "done", sizeof "done") != sizeof "done") { > > >+ perror("client read/write"); > > >+ fprintf(stderr, "Couldn't read/write remote address\n"); > > > > It's just an example, however, better to have an accurate error message and > > separate into 2 stubs. > > There is no value to the user in distinguishing the two cases. They > both mean the socket closed unexpectedly. Agree, it will give nothing to the user. We are all treating pingpong applications very similar - works/doesn't work, while "doesn't work" actually says that something very basic is broken. > > Jason > -- > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html
Attachment:
signature.asc
Description: PGP signature