mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jiang Yan Xu <...@jxu.me>
Subject Re: Review Request 48314: Added os::empty(path) to check if contents in a directory is empty.
Date Tue, 21 Jun 2016 20:27:48 GMT


> On June 21, 2016, 10:33 a.m., Jiang Yan Xu wrote:
> > 3rdparty/stout/include/stout/os/empty.hpp, line 37
> > <https://reviews.apache.org/r/48314/diff/5/?file=1425826#file1425826line37>
> >
> >     Looks like the Windows version of `readdir` and its internal calls do set errno
([exmaple](https://github.com/apache/mesos/blob/56503ea6547c65de7e3e7b294419400894d54003/3rdparty/stout/include/stout/internal/windows/dirent.hpp#L133))
so we don't have to explicitly set things here.

I see. You are right. If there's no error, errno is not guaranteed to be zero unless we set
it here.


> On June 21, 2016, 10:33 a.m., Jiang Yan Xu wrote:
> > 3rdparty/stout/include/stout/os/empty.hpp, line 42
> > <https://reviews.apache.org/r/48314/diff/5/?file=1425826#file1425826line42>
> >
> >     No need for this.

If the set `errno = 0`, do we still need it here?


- Jiang Yan


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


On June 21, 2016, 11:40 a.m., Anindya Sinha wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/48314/
> -----------------------------------------------------------
> 
> (Updated June 21, 2016, 11:40 a.m.)
> 
> 
> Review request for mesos, Neil Conway and Jiang Yan Xu.
> 
> 
> Bugs: MESOS-5448
>     https://issues.apache.org/jira/browse/MESOS-5448
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added os::empty(path) to check if contents in a directory is empty.
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/Makefile.am f10c836c1ac008cc4055741648b5e7dd697e4c1e 
>   3rdparty/stout/include/stout/os.hpp 53b00932693fba7cf6514da6a519269a904de345 
>   3rdparty/stout/include/stout/os/empty.hpp PRE-CREATION 
>   3rdparty/stout/tests/os/rmdir_tests.cpp a11bfc9f9e6cbb05f3e9ce0ea48297b8f88fe53f 
> 
> Diff: https://reviews.apache.org/r/48314/diff/
> 
> 
> Testing
> -------
> 
> All tests passed.
> 
> 
> Thanks,
> 
> Anindya Sinha
> 
>


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