> On Dec. 12, 2012, midnight, Benjamin Hindman wrote:
> > third_party/libprocess/include/stout/protobuf.hpp, line 125
> > <https://reviews.apache.org/r/8423/diff/1/?file=235911#file235911line125>
> >
> >     As you mention, if this is an EINTR then we can retry, so feel free to 
> > add a TODO to do this at some point.

"POSIX allows a read() that is interrupted after reading some data to return -1 
(with errno set to EINTR) or to return the number of bytes already read."

Therefore, we need to handle both EINTR and partial reads (with a read loop).
Pushing this into os.hpp read/write helpers would make things easier (I see the 
same mistake made there).

Added TODOs for now, and at some point I'd like to fix these.

Likewise for write:
"Conforming to
SVr4, 4.3BSD, POSIX.1-2001.
Under SVr4 a write may be interrupted and return EINTR at any point, not just 
before any data is written.

Notes
<snip>
If a write() is interrupted by a signal handler before any bytes are written, 
then the call fails with the error EINTR; if it is interrupted after at least 
one byte has been written, the call succeeds, and returns the number of bytes 
written."


- Ben


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/8423/#review14334
-----------------------------------------------------------


On Dec. 7, 2012, 10:54 p.m., Ben Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/8423/
> -----------------------------------------------------------
> 
> (Updated Dec. 7, 2012, 10:54 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Vinod Kone.
> 
> 
> Description
> -------
> 
> The following error was reported on the mailing list:
> 
> This is off of trunk; gcc version is 4.6.2.
> 
> Error message is "In function protobuf.hpp in function 'Result<bool> 
> protobuf::read(int, google::protobuf::Message*)': ... protobuf.hpp:131:24: 
> Comparison between signed and unsigned integer expressions 
> [-Werror=signed-compare]"
> 
> 
> Diffs
> -----
> 
>   third_party/libprocess/include/stout/protobuf.hpp 
> d2b5daedb878fcf04bc38ba912ffc0ca9a930729 
> 
> Diff: https://reviews.apache.org/r/8423/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Ben Mahler
> 
>

Reply via email to