> On Sept. 28, 2012, 5:43 p.m., Ben Mahler wrote: > > third_party/libprocess/include/stout/os.hpp, line 459 > > <https://reviews.apache.org/r/7338/diff/1/?file=160437#file160437line459> > > > > I like your note above about "NOT deleting recursively", and I think > > this case is special enough for you to use ::rmdir inline in the cgroups > > code rather adding the flag here. > > > > I missed it in the refactor since I wasn't sure why you used ::rmdir > > instead of os::rmdir, but the notes you added will make sure no one else > > makes this mistake :)
Having an extra bool is more powerful than just the comment. Now, in a future refactor, the programmer will have to wonder, "what is this extra argument?", and actually do something about it to get the code to compile (versus forgetting to read a comment). Having 'rmdirr' (extra 'r' at end) or 'mkdirp' accomplishes the same thing but since we already have os::mkdir and os::rmdir I think adding the argument is perfectly fine. - Benjamin ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/7338/#review12025 ----------------------------------------------------------- On Sept. 28, 2012, 5:33 a.m., Jie Yu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/7338/ > ----------------------------------------------------------- > > (Updated Sept. 28, 2012, 5:33 a.m.) > > > Review request for mesos and Benjamin Hindman. > > > Description > ------- > > The recent refactor changes break the assumptions in the cgroups code. > > > Diffs > ----- > > src/linux/cgroups.cpp cdafe6e > third_party/libprocess/include/stout/os.hpp 13dbc71 > > Diff: https://reviews.apache.org/r/7338/diff/ > > > Testing > ------- > > make check. > > Tested on my vm (latest ubuntu 12.04) > > > Thanks, > > Jie Yu > >
