> On April 29, 2016, 12:19 a.m., Qian Zhang wrote: > > src/cli/execute.cpp, lines 172-175 > > <https://reviews.apache.org/r/46799/diff/1/?file=1365019#file1365019line172> > > > > Can we only add this flag in Linux? Then user will not see this flag at > > all when running `mesos-execute` in other platorms. > > Jojy Varghese wrote: > I avoided that logic as it would mean spreading `ifdef` all over the file. > > Qian Zhang wrote: > Right, but I think that is the common way to handle the platform-specific > logic, you can take a look at: > https://github.com/apache/mesos/blob/master/src/slave/containerizer/mesos/containerizer.cpp, > in this file, we use `#ifdef __linux__` for all the isolators which can be > only enabled on Linux.
I have looked at the platform speific ifdefs in the code and I am not sure if that is the right way to do platform specific code. Linux kernel is a good example of how it actually should be done. But I am changing the code in cli for now for uniformity. - Jojy ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/46799/#review131021 ----------------------------------------------------------- On May 6, 2016, 5:06 p.m., Jojy Varghese wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/46799/ > ----------------------------------------------------------- > > (Updated May 6, 2016, 5:06 p.m.) > > > Review request for mesos and Jie Yu. > > > Repository: mesos > > > Description > ------- > > This change introduces two flags: `user` and `capabilities`. > > user: used to specify the user name for the command. > capabilities: comma separated list of capabilities the task > requires. > > > Diffs > ----- > > src/cli/execute.cpp 4711e80314e2fc4cde077bebd9a8167324c3254e > > Diff: https://reviews.apache.org/r/46799/diff/ > > > Testing > ------- > > make check. > > > Thanks, > > Jojy Varghese > >