> On Nov. 17, 2014, 10:49 a.m., Dominic Hamon wrote: > > 3rdparty/libprocess/include/process/socket.hpp, line 95 > > <https://reviews.apache.org/r/28125/diff/1/?file=765990#file765990line95> > > > > why not just do the second version all the time? > > Joris Van Remoortere wrote: > Because making 1 system call instead of 3 is preferred. That is why this > option was added to the system call itself.
I understand why the single case is preferred, but given we can't support that in all cases, this just adds extra noise and reduces readability. Just use the long form please to cover every case. - Dominic ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/28125/#review61762 ----------------------------------------------------------- On Nov. 17, 2014, 10:47 a.m., Joris Van Remoortere wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/28125/ > ----------------------------------------------------------- > > (Updated Nov. 17, 2014, 10:47 a.m.) > > > Review request for mesos, Benjamin Hindman, Niklas Nielsen, Till Toenshoff, > and Vinod Kone. > > > Bugs: MESOS-2116 > https://issues.apache.org/jira/browse/MESOS-2116 > > > Repository: mesos-git > > > Description > ------- > > Test whether SOCK_NONBLOCK and SOCK_CLOEXEC are defined to use single system > call to create socket. > Otherwise use os::nonblock and os::cloexec after creating the socket. > > > Diffs > ----- > > 3rdparty/libprocess/include/process/socket.hpp > 20136ba4c65883b8bbcc8498e09f7ff7b50b68a4 > > Diff: https://reviews.apache.org/r/28125/diff/ > > > Testing > ------- > > make check on linux > make check on macos > > > Thanks, > > Joris Van Remoortere > >
