diff options
author | Tom Smeding <tom.smeding@gmail.com> | 2018-08-20 23:51:16 +0200 |
---|---|---|
committer | Tom Smeding <tom.smeding@gmail.com> | 2018-08-20 23:52:03 +0200 |
commit | 57a1091dfb2c6403cbe63c7ddca8acc7e3d0f940 (patch) | |
tree | a997ed523a853d9d5fff7d5b90b12a180b00a231 /competition/process.h | |
parent | f0b6d1b9c46578183b427bcec4bbe99ab10c7b97 (diff) |
Diffstat (limited to 'competition/process.h')
-rw-r--r-- | competition/process.h | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/competition/process.h b/competition/process.h deleted file mode 100644 index ddd80b9..0000000 --- a/competition/process.h +++ /dev/null @@ -1,32 +0,0 @@ -#pragma once - -#include <string> -#include <optional> -#include <string_view> -#include <unistd.h> - -using namespace std; - - -class Process { - string execname; - optional<string> stderrRedirect; - pid_t pid = -1; - int infd = -1, outfd = -1; - - string readBuf; - -public: - Process(const string_view execname); - - void redirectStderr(const string_view fname); - - void run(); - void wait(); - void stop(); - void unStop(); - void terminate(); - - bool writeLine(const string_view line); - optional<string> readLine(); -}; |