That is correct. It should also check for EINTR and EAGAIN (altough I'm not entirely sure about EAGAIN).
On Thu, Sep 15, 2011 at 9:26 AM, Damien Le Moal <[email protected]> wrote: > > Hello, > > While using ndb, I got into trouble and think I may have stumbled on a > bug. Below is the description of the problem. > > Referring to the latest version code (2.9.24), in the client tool > (ndb-client.c), at the end of the function "negotiate", the following > code is made: > > if (read(sock, &buf, 124) < 0) > err(...); > > which is to retrieve the 124 zeroed bytes that the server sends at the > end of the negotiation. > > The problem is that the above call may actually return far less than 124 > zeroed bytes, which would leave some zeroed bytes in the socket and > cause problems with reception of replies in the ndb kernel module. I > actually got this problem: even though negotiation succeeds, as soon as > the first request is sent by the client, the reply for it gets an > invalid magic error and the client disconnect. > > I think that the above read should be in a loop, similar to what is done > in the function readit in the server side. > > Best regards. > > -- > Damien Le Moal, > Hitachi Ltd. Yokohama Lab. Japan. > > > ------------------------------------------------------------------------------ > Doing More with Less: The Next Generation Virtual Desktop > What are the key obstacles that have prevented many mid-market businesses > from deploying virtual desktops? How do next-generation virtual desktops > provide companies an easier-to-deploy, easier-to-manage and more affordable > virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/ > _______________________________________________ > Nbd-general mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/nbd-general > > -- www.unixexpert.nl ------------------------------------------------------------------------------ Doing More with Less: The Next Generation Virtual Desktop What are the key obstacles that have prevented many mid-market businesses from deploying virtual desktops? How do next-generation virtual desktops provide companies an easier-to-deploy, easier-to-manage and more affordable virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/ _______________________________________________ Nbd-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nbd-general
