> On May 1, 2014, 5:53 p.m., Vinod Kone wrote: > > 3rdparty/libprocess/3rdparty/stout/include/stout/os/exists.hpp, line 38 > > <https://reviews.apache.org/r/20970/diff/1/?file=572847#file572847line38> > > > > is it possible to get a EPERM with sig 0?
Yes, if you don't have permission to send signals to the process (but the process does exist) then return is -1 and errno == EPERM [EPERM] The sending process is not the super-user and its effective user id does not match the effective user-id of the receiving process. - Ian ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/20970/#review41991 ----------------------------------------------------------- On May 1, 2014, 12:17 p.m., Ian Downes wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/20970/ > ----------------------------------------------------------- > > (Updated May 1, 2014, 12:17 p.m.) > > > Review request for mesos, Ben Mahler and Vinod Kone. > > > Repository: mesos-git > > > Description > ------- > > Uses kill(0, pid) to check pid validity. This is much cheaper than using > os::process(pid) which constructs a full Process object. Works regardless of > permission to signal the pid. > > > Diffs > ----- > > 3rdparty/libprocess/3rdparty/stout/include/stout/os/exists.hpp > d9860d754e04f4ab5cc8f0a095b758ec62626b90 > 3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp > 94eb256d24bc001660d63bd91b608988205a3d09 > > Diff: https://reviews.apache.org/r/20970/diff/ > > > Testing > ------- > > # Added a test > make check > > > Thanks, > > Ian Downes > >
