> On July 27, 2013, 1:13 a.m., Ben Mahler wrote: > > 3rdparty/libprocess/3rdparty/stout/include/stout/proc.hpp, line 251 > > <https://reviews.apache.org/r/12435/diff/1/?file=319617#file319617line251> > > > > Why not use os::read instead? It would be a lot less code and you can > > get a clear error message that way when we can't open the file as well :) > > > > I think we should move away from the C++ ifstream style code, it makes > > it easier to avoid unintended exceptions: > > https://issues.apache.org/jira/browse/MESOS-434 > > > > Also it will let you do strings::split(s, "\0") and strings::join(args, > > " "), or strings::replace(s, "\0", " ").
I can't use os::read for proc files. The rest of this file uses this style as well, so we should just clean this up in the future. - Benjamin ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/12435/#review24002 ----------------------------------------------------------- On July 10, 2013, 7:36 a.m., Benjamin Hindman wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/12435/ > ----------------------------------------------------------- > > (Updated July 10, 2013, 7:36 a.m.) > > > Review request for mesos and Ben Mahler. > > > Repository: mesos > > > Description > ------- > > See summary. > > > Diffs > ----- > > 3rdparty/libprocess/3rdparty/stout/include/stout/os/linux.hpp > 4e37b3eee45a62107d7f03919bbfa3244613e2b3 > 3rdparty/libprocess/3rdparty/stout/include/stout/proc.hpp > 2fcc04b23cc4bb7ef6c7f02fdc7397f3bba84fc0 > > Diff: https://reviews.apache.org/r/12435/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Benjamin Hindman > >
