diff options
author | 2022-07-05 08:15:37 +0000 | |
---|---|---|
committer | 2022-07-05 10:35:07 +0000 | |
commit | ff95ad517297384d4a2ea589490019f90d637e17 (patch) | |
tree | 8632d5ae79887bdc0ab671f091142f2c38a49728 /runtime/exec_utils.h | |
parent | c7df8d12ea3228af445fb821c3cac13ca85a9e5f (diff) |
Revert "Update ExecUtils to support artd use cases."
This reverts commit f0061f62fbd5e4766220c154d914e7b9d07a86eb.
Reason for revert: Broke LUCI.
Change-Id: Iec793a667545a8469f2a712135353e816c623262
Diffstat (limited to 'runtime/exec_utils.h')
-rw-r--r-- | runtime/exec_utils.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/runtime/exec_utils.h b/runtime/exec_utils.h index ff90ebdfb3..7ce0a9c20a 100644 --- a/runtime/exec_utils.h +++ b/runtime/exec_utils.h @@ -29,13 +29,13 @@ namespace art { // of the runtime (Runtime::Current()) was started. If no instance of the runtime was started, it // will use the current environment settings. -bool Exec(const std::vector<std::string>& arg_vector, /*out*/ std::string* error_msg); -int ExecAndReturnCode(const std::vector<std::string>& arg_vector, /*out*/ std::string* error_msg); +bool Exec(std::vector<std::string>& arg_vector, /*out*/ std::string* error_msg); +int ExecAndReturnCode(std::vector<std::string>& arg_vector, /*out*/ std::string* error_msg); // Execute the command specified in `argv_vector` in a subprocess with a timeout. // Returns the process exit code on success, -1 otherwise. -int ExecAndReturnCode(const std::vector<std::string>& arg_vector, - int timeout_sec, +int ExecAndReturnCode(std::vector<std::string>& arg_vector, + time_t timeout_secs, /*out*/ bool* timed_out, /*out*/ std::string* error_msg); @@ -44,21 +44,20 @@ class ExecUtils { public: virtual ~ExecUtils() = default; - virtual bool Exec(const std::vector<std::string>& arg_vector, - /*out*/ std::string* error_msg) const { + virtual bool Exec(std::vector<std::string>& arg_vector, /*out*/ std::string* error_msg) const { return art::Exec(arg_vector, error_msg); } - virtual int ExecAndReturnCode(const std::vector<std::string>& arg_vector, + virtual int ExecAndReturnCode(std::vector<std::string>& arg_vector, /*out*/ std::string* error_msg) const { return art::ExecAndReturnCode(arg_vector, error_msg); } - virtual int ExecAndReturnCode(const std::vector<std::string>& arg_vector, - int timeout_sec, + virtual int ExecAndReturnCode(std::vector<std::string>& arg_vector, + time_t timeout_secs, /*out*/ bool* timed_out, /*out*/ std::string* error_msg) const { - return art::ExecAndReturnCode(arg_vector, timeout_sec, timed_out, error_msg); + return art::ExecAndReturnCode(arg_vector, timeout_secs, timed_out, error_msg); } }; |