diff options
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(); -}; |