-
Notifications
You must be signed in to change notification settings - Fork 94
Expand file tree
/
Copy pathsubprocess.h
More file actions
35 lines (26 loc) · 862 Bytes
/
subprocess.h
File metadata and controls
35 lines (26 loc) · 862 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#pragma once
// system headers
#include <cstdio>
#include <unordered_map>
#include <string>
#include <utility>
#include <vector>
// local headers
#include "subprocess_result.h"
#include "util.h"
namespace linuxdeploy {
namespace subprocess {
class subprocess {
private:
std::vector<std::string> args_{};
std::unordered_map<std::string, std::string> env_{};
public:
explicit subprocess(std::initializer_list<std::string> args);
explicit subprocess(std::initializer_list<std::string> args, subprocess_env_map_t env);
explicit subprocess(std::vector<std::string> args);
explicit subprocess(std::vector<std::string> args, subprocess_env_map_t env);
subprocess_result run() const;
std::string check_output() const;
};
}
}