aboutsummaryrefslogtreecommitdiff
path: root/include/cru/common/SubProcess.h
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2024-06-01 17:09:44 +0800
committercrupest <crupest@outlook.com>2024-06-08 17:01:55 +0800
commitd1f409530db6f9b712fd672c4c3154cac7eebad1 (patch)
tree1e48a3e2ff14e66aac2503a74df28cca7d85d02c /include/cru/common/SubProcess.h
parentad796a167e33b54c7fa23ea21c73d57dba4fc928 (diff)
downloadcru-d1f409530db6f9b712fd672c4c3154cac7eebad1.tar.gz
cru-d1f409530db6f9b712fd672c4c3154cac7eebad1.tar.bz2
cru-d1f409530db6f9b712fd672c4c3154cac7eebad1.zip
HALF WORK: refactor something and implement part of subprocess.
Diffstat (limited to 'include/cru/common/SubProcess.h')
-rw-r--r--include/cru/common/SubProcess.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/cru/common/SubProcess.h b/include/cru/common/SubProcess.h
index 8e5e49f5..ba46d049 100644
--- a/include/cru/common/SubProcess.h
+++ b/include/cru/common/SubProcess.h
@@ -9,6 +9,7 @@
#include <mutex>
#include <optional>
#include <thread>
+#include <unordered_map>
#include <vector>
namespace cru {
@@ -33,20 +34,19 @@ enum class PlatformSubProcessStatus {
class CRU_BASE_API SubProcessException : public Exception {
public:
- SubProcessException(String message = {});
- ~SubProcessException() override;
+ using Exception::Exception;
};
-class CRU_BASE_API SubProcessFailedToStartException : public Exception {
+class CRU_BASE_API SubProcessFailedToStartException
+ : public SubProcessException {
public:
- SubProcessFailedToStartException(String message = {});
- ~SubProcessFailedToStartException() override;
+ using SubProcessException::SubProcessException;
};
struct PlatformSubProcessStartInfo {
String program;
std::vector<String> arguments;
- std::vector<String> environments;
+ std::unordered_map<String, String> environments;
};
struct PlatformSubProcessExitResult {