1 // Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
2 // Use of this source code is governed by an apache-2.0 license that can be
3 // found in the LICENSE file.
5 #ifndef COMMON_UTILS_SUBPROCESS_H_
6 #define COMMON_UTILS_SUBPROCESS_H_
12 namespace common_installer {
16 explicit Subprocess(const std::string& program);
18 template<typename ...Args> bool Run(Args&&... args) {
19 std::vector<std::string> argv{std::forward<Args>(args)...};
20 return RunWithArgs(argv);
24 const std::vector<std::string>& args = std::vector<std::string>());
27 void set_uid(int uid) {
40 } // namespace common_installer
42 #endif // COMMON_UTILS_SUBPROCESS_H_