mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
Remove unneeded Executor ctors
absl::Span<const T> has an implicit ctor from container types. PiperOrigin-RevId: 355155858 Change-Id: I70aea6b276b5e51f7682cba45bb2d4514cb1bc90
This commit is contained in:
parent
e77099876a
commit
0bbcb495ee
|
@ -54,14 +54,6 @@ class Executor final {
|
||||||
SetUpServerSideCommsFd();
|
SetUpServerSideCommsFd();
|
||||||
}
|
}
|
||||||
|
|
||||||
// As above, but with `const std::vector<std::string>&`
|
|
||||||
// Templated to avoid ambiguity with the absl::Span overloads when called
|
|
||||||
// with brace-initializers.
|
|
||||||
template <typename = void>
|
|
||||||
Executor(absl::string_view path, const std::vector<std::string>& argv,
|
|
||||||
const std::vector<std::string>& envp = CopyEnviron())
|
|
||||||
: Executor(path, absl::MakeSpan(argv), absl::MakeSpan(envp)) {}
|
|
||||||
|
|
||||||
// Executor will own this file-descriptor, so if intend to use it, pass here
|
// Executor will own this file-descriptor, so if intend to use it, pass here
|
||||||
// dup(fd) instead
|
// dup(fd) instead
|
||||||
Executor(int exec_fd, absl::Span<const std::string> argv,
|
Executor(int exec_fd, absl::Span<const std::string> argv,
|
||||||
|
@ -73,14 +65,6 @@ class Executor final {
|
||||||
SetUpServerSideCommsFd();
|
SetUpServerSideCommsFd();
|
||||||
}
|
}
|
||||||
|
|
||||||
// As above, but with `const std::vector<std::string>&`
|
|
||||||
// Templated to avoid ambiguity with the absl::Span overloads when called
|
|
||||||
// with brace-initializers.
|
|
||||||
template <typename = void>
|
|
||||||
Executor(int exec_fd, const std::vector<std::string>& argv,
|
|
||||||
const std::vector<std::string>& envp)
|
|
||||||
: Executor(exec_fd, absl::MakeSpan(argv), absl::MakeSpan(envp)) {}
|
|
||||||
|
|
||||||
// Uses a custom ForkServer (which the supplied ForkClient can communicate
|
// Uses a custom ForkServer (which the supplied ForkClient can communicate
|
||||||
// with), which knows how to fork (or even execute) new sandboxed processes
|
// with), which knows how to fork (or even execute) new sandboxed processes
|
||||||
// (hence, no need to supply path/argv/envp here)
|
// (hence, no need to supply path/argv/envp here)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user