> On June 12, 2013, 11:12 p.m., Vinod Kone wrote: > > 3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp, line 1118 > > <https://reviews.apache.org/r/11848/diff/1/?file=304301#file304301line1118> > > > > Would it make sense for os::process to return a Result instead of a Try? > > > > With the current semantics, I'm not sure how to differentiate between a > > zombie and a reaped process.
Maybe we need an os::exists(pid_t) and an os::alive(pid_t)? Then in order to differentiate the two states we need to call two different methods. - Jiang Yan ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/11848/#review21823 ----------------------------------------------------------- On June 12, 2013, 7:45 p.m., Ben Mahler wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/11848/ > ----------------------------------------------------------- > > (Updated June 12, 2013, 7:45 p.m.) > > > Review request for mesos, Benjamin Hindman, Vinod Kone, and Jiang Yan Xu. > > > Description > ------- > > os::alive currently considers zombie processes to be alive, which is less > than optimal, as semantically they are "dead" and waiting to be reaped. > > > Diffs > ----- > > 3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp > 1b3fb47d7567b5467fef2a2bb15d5c4a2ea42aa5 > 3rdparty/libprocess/3rdparty/stout/include/stout/os/linux.hpp PRE-CREATION > 3rdparty/libprocess/3rdparty/stout/include/stout/os/osx.hpp PRE-CREATION > 3rdparty/libprocess/3rdparty/stout/include/stout/os/process.hpp > PRE-CREATION > > Diff: https://reviews.apache.org/r/11848/diff/ > > > Testing > ------- > > This was tested through my killtree change, although it would be nice to have > tests once we have an abstraction for creating arbitrary process trees. > > > Thanks, > > Ben Mahler > >
