> On Aug. 17, 2018, 8:02 p.m., Benjamin Mahler wrote: > > Hm.. it feels wrong to take the control away from the caller, since this > > was intended as just a wrapper, like open.hpp: > > > > https://github.com/apache/mesos/blob/1.6.1/3rdparty/stout/include/stout/os/posix/open.hpp#L29-L43 > > > > Can we follow the approach there? Do we actually support systems without > > pipe2?
I didn't add the option because there's not really a safe way to use this, except to start with O_CLOEXEC and then clear it after the fork. I think that it's preferable to be safe by default and for the callers that need to be special to add the extra code. > Do we actually support systems without pipe2? macOS, for example. - James ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/63270/#review207537 ----------------------------------------------------------- On Aug. 17, 2018, 5:53 p.m., James Peach wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/63270/ > ----------------------------------------------------------- > > (Updated Aug. 17, 2018, 5:53 p.m.) > > > Review request for mesos, Andrew Schwartzmeyer, Benjamin Bannier, Benjamin > Mahler, Greg Mann, and Jie Yu. > > > Bugs: MESOS-8128 > https://issues.apache.org/jira/browse/MESOS-8128 > > > Repository: mesos > > > Description > ------- > > Updated `os::pipe()` to always return O_CLOEXEC descriptors, > atomically if we are on Linux or FreeBSD and the `pipe2(2)` > system call is available. > > > Diffs > ----- > > 3rdparty/stout/include/stout/os/posix/pipe.hpp > ac76224ff8fa1cc535c78731580e77a27967136a > > > Diff: https://reviews.apache.org/r/63270/diff/4/ > > > Testing > ------- > > make check (Fedora 25) > > > Thanks, > > James Peach > >
