----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/12430/#review23020 -----------------------------------------------------------
3rdparty/libprocess/3rdparty/stout/include/stout/os/osx.hpp <https://reviews.apache.org/r/12430/#comment46801> s/priveledge/privilege/ 3rdparty/libprocess/3rdparty/stout/include/stout/os/osx.hpp <https://reviews.apache.org/r/12430/#comment46802> Any pointers for this? I found a few posts and the like that seemed to show the pseudo-struct that gets returned, perhaps document that? 3rdparty/libprocess/3rdparty/stout/include/stout/os/osx.hpp <https://reviews.apache.org/r/12430/#comment46803> This took me a bit to understand, maybe something like the following would be simpler to follow: std::vector<std::string> tokens = strings::tokenize(args.get(), std::string(1, '\0')); if (argc == 1) { // When there are no arguments, all we care about is // the executable path. s = tokens[0]; } else if (argc > 1) { // When there are arguments, we grab arg[0..n] // assuming arg0 is the canonical executable name. tokens.erase(tokens.front()); // Remove path. s = strings::join(" ", tokens); } command = s; Also, what about the argc == 0 case? Should that be an error? Should there be an error when tokens.size() != argc? What do you think? - Ben Mahler 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/12430/ > ----------------------------------------------------------- > > (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/osx.hpp > e8429b997cdefd703ef16249789750fe7d8ac9c4 > 3rdparty/libprocess/3rdparty/stout/tests/strings_tests.cpp > 7ec94468df3d447a0c30ad9c82fa4c2fe91deb7e > > Diff: https://reviews.apache.org/r/12430/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Benjamin Hindman > >
