----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/21998/#review44248 -----------------------------------------------------------
Added two fixes we might want to consider if we want to avoid introducing the possibility of additional leaked file descriptors during fork. 3rdparty/libprocess/src/process.cpp <https://reviews.apache.org/r/21998/#comment78598> We're currently not cloexec'ing this fd. We could use O_CLOEXEC as a flag on open to prevent leaking, latest Open Group page is here: http://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html 3rdparty/libprocess/src/process.cpp <https://reviews.apache.org/r/21998/#comment78597> Per the cloexec race: We should update io::redirect to use 'dup3' with O_CLOEXEC to avoid leaking these descriptors in any forked children. Perhaps a TODO for 'os::dup' or 'os::duplicate' that provides a default 'flags = O_CLOEXEC'? - Ben Mahler On May 29, 2014, 12:48 a.m., Benjamin Hindman wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/21998/ > ----------------------------------------------------------- > > (Updated May 29, 2014, 12:48 a.m.) > > > Review request for mesos, Ben Mahler, Till Toenshoff, and Vinod Kone. > > > Repository: mesos-git > > > Description > ------- > > See summary. > > > Diffs > ----- > > 3rdparty/libprocess/include/process/io.hpp > 7f9b2420ac1568eaf81a82c189a4b445abee9a90 > 3rdparty/libprocess/src/process.cpp > 58bae5b0e26acacca7e43dbde291e7700a583fd9 > 3rdparty/libprocess/src/tests/io_tests.cpp > 3c7b459f1238b337afada9ff94523ada2bc2b97f > > Diff: https://reviews.apache.org/r/21998/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Benjamin Hindman > >
