mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Schwartzmeyer <and...@schwartzmeyer.com>
Subject Re: Review Request 66431: Windows: Fixed `os::read()` to use `ReadFile()`.
Date Fri, 06 Apr 2018 17:57:05 GMT


> On April 5, 2018, 4:51 p.m., Akash Gupta wrote:
> > 3rdparty/stout/include/stout/os/windows/read.hpp
> > Lines 43 (patched)
> > <https://reviews.apache.org/r/66431/diff/2/?file=1992414#file1992414line45>
> >
> >     Do you know why the return value is `ssize_t` instead of a `Try<size_t>`.
Is it due to it being async signal safe?
> >     
> >     I imagine the callers of this function will check for error using `errno` then?
Since we aren't using the CRT anymore, we might need to map some Windows errors to errno...

It's only used inside `Try<string> os::read()` (and once in `io.cpp`), so this is kind
of an internal function. Both uses have an ifdef for POSIX/Windows errors.

That said, I'm fixing up a couple problems I found in `os/read.hpp` and will update this review.


- Andrew


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


On April 4, 2018, 12:13 p.m., Andrew Schwartzmeyer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66431/
> -----------------------------------------------------------
> 
> (Updated April 4, 2018, 12:13 p.m.)
> 
> 
> Review request for mesos, Akash Gupta, Eric Mumau, John Kordich, Joseph Wu, and Michael
Park.
> 
> 
> Bugs: MESOS-8676
>     https://issues.apache.org/jira/browse/MESOS-8676
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This can eventually support overlapped I/O.
> 
> The Windows API `ReadFile()` returns an error if the pipe is broken,
> where `_read()` did not, but this is not an error for us as the data
> is still read correctly. So we ignore it.
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/stout/os/windows/read.hpp 8047ad590fcc46d3ec46b551472d8c518ae49cc1

> 
> 
> Diff: https://reviews.apache.org/r/66431/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrew Schwartzmeyer
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message