mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph Wu <jos...@mesosphere.io>
Subject Re: Review Request 50357: Removed a redundant CLOEXEC from linux/ns.hpp.
Date Fri, 22 Jul 2016 21:54:29 GMT


> On July 22, 2016, 2:45 p.m., Avinash sridharan wrote:
> > src/linux/ns.hpp, line 153
> > <https://reviews.apache.org/r/50357/diff/1/?file=1451401#file1451401line153>
> >
> >     SO We don't need this because this is a no-op?
> >     https://github.com/apache/mesos/blob/4f26c7d8dbd0702c7dcd8023717636d5dcc2f90e/3rdparty/stout/include/stout/os/open.hpp#L30
> >     
> >     The above seems to be defining O_CLOEXEC, even on older systems that don't have
them and explicitly calling `cloexec` on the `fd`.

The funny thing about this code is, we use `O_CLOEXEC` outside of the `#ifndef`.  If the code
compiles, then `O_CLOEXEC` must be defined, either by the system headers, or by `os/open.hpp`.

So the code I'm removing should be ifdef'd out in all cases :)


- Joseph


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


On July 22, 2016, 2:17 p.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50357/
> -----------------------------------------------------------
> 
> (Updated July 22, 2016, 2:17 p.m.)
> 
> 
> Review request for mesos, Avinash sridharan, Gilbert Song, Artem Harutyunyan, Ian Downes,
and Jie Yu.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The call to `os::open` that creates the FD includes O_CLOEXEC.
> This will set CLOEXEC on the FD before `os::open` returns.
> 
> 
> Diffs
> -----
> 
>   src/linux/ns.hpp 4e843b7835f44418b79a0b38e3d66aa30e68f700 
> 
> Diff: https://reviews.apache.org/r/50357/diff/
> 
> 
> Testing
> -------
> 
> make check (CentOS 7)
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>


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