--- /dev/null
+/* $Id$
+
+This file is part of gldbg
+Copyright © 2009 Mikko Rasa, Mikkosoft Productions
+Distributed under the GPL
+*/
+
+#ifndef PROCESS_H_
+#define PROCESS_H_
+
+#include <map>
+#include <string>
+#include <vector>
+
+class Process
+{
+public:
+ enum State
+ {
+ INACTIVE,
+ STARTING,
+ RUNNING,
+ STOPPED
+ };
+
+private:
+ std::vector<std::string> args;
+ std::map<std::string, std::string> env;
+ int pid;
+ State state;
+
+public:
+ Process(const std::vector<std::string> &);
+ void setenv(const std::string &, const std::string &);
+ void launch();
+ int check();
+ void stop();
+ void resume(int = 0);
+ void kill();
+ State get_state() const { return state; }
+private:
+ long ptrace(int, void *, void *);
+};
+
+#endif