| 11599 | |
| 11600 | |
| 11601 | static CommandInfo defaultExecutorCommandInfo( |
| 11602 | const string& launcherDir, |
| 11603 | const Option<string>& user) |
| 11604 | { |
| 11605 | Result<string> path = os::realpath( |
| 11606 | path::join(launcherDir, MESOS_DEFAULT_EXECUTOR)); |
| 11607 | |
| 11608 | CommandInfo commandInfo; |
| 11609 | if (path.isSome()) { |
| 11610 | commandInfo.set_shell(false); |
| 11611 | commandInfo.set_value(path.get()); |
| 11612 | commandInfo.add_arguments(MESOS_DEFAULT_EXECUTOR); |
| 11613 | commandInfo.add_arguments("--launcher_dir=" + launcherDir); |
| 11614 | } else { |
| 11615 | commandInfo.set_shell(true); |
| 11616 | commandInfo.set_value( |
| 11617 | "echo '" + |
| 11618 | (path.isError() ? path.error() : "No such file or directory") + |
| 11619 | "'; exit 1"); |
| 11620 | } |
| 11621 | |
| 11622 | if (user.isSome()) { |
| 11623 | commandInfo.set_user(user.get()); |
| 11624 | } |
| 11625 | |
| 11626 | return commandInfo; |
| 11627 | } |
| 11628 | |
| 11629 | |
| 11630 | static void setLimit(Option<Value::Scalar>& limit, const Value::Scalar& delta) |