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:
Wiktor Garbacz 2021-02-02 06:54:56 -08:00 committed by Copybara-Service
parent e77099876a
commit 0bbcb495ee

View File

@ -54,14 +54,6 @@ class Executor final {
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
// dup(fd) instead
Executor(int exec_fd, absl::Span<const std::string> argv,
@ -73,14 +65,6 @@ class Executor final {
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
// with), which knows how to fork (or even execute) new sandboxed processes
// (hence, no need to supply path/argv/envp here)