summaryrefslogtreecommitdiff
path: root/src/autoplay/child_process.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/autoplay/child_process.h')
-rw-r--r--src/autoplay/child_process.h53
1 files changed, 0 insertions, 53 deletions
diff --git a/src/autoplay/child_process.h b/src/autoplay/child_process.h
deleted file mode 100644
index 6c03ecd..0000000
--- a/src/autoplay/child_process.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// child_process.h -- description
-
-#ifndef _CHILD_PROCESS_H_
-#define _CHILD_PROCESS_H_
-
-#include <unistd.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <vector>
-using namespace std;
-
-namespace util {
-
-class ChildProcess {
- public:
- explicit ChildProcess(const char *commandline)
- : commandline_(strdup(commandline)),
- name_(NULL),
- running_(false),
- pid_(-1),
- to_(NULL),
- from_(NULL),
- child_ready_(false) {}
- virtual ~ChildProcess() {
- Stop();
- free(commandline_);
- commandline_ = NULL;
- }
-
- virtual void Start();
- virtual void Stop();
- void Send(char *line);
- void Receive(char *line, int size);
- bool Poll();
- void Flush();
-
- private:
- void ParseCommandline(vector<char *> *args);
- char *commandline_;
- char *name_;
- bool running_;
- pid_t pid_;
- int write_pipe_[2];
- int read_pipe_[2];
- FILE *to_;
- FILE *from_;
- volatile bool child_ready_;
-};
-
-} // namespace
-
-#endif /* _CHILD_PROCESS_H_ */