summaryrefslogtreecommitdiff
path: root/include/TaskMan.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/TaskMan.h')
-rw-r--r--include/TaskMan.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/include/TaskMan.h b/include/TaskMan.h
index 5d7d034..7ceba4a 100644
--- a/include/TaskMan.h
+++ b/include/TaskMan.h
@@ -9,22 +9,17 @@ typedef int sigset_t;
#include <Task.h>
#include <vector>
-#define E_BURST 0
-#define E_HANDLE 1
-#define E_PROCESS 2
-#define E_TIMEOUT 3
-#define E_TASK 4
-
class TaskMan : public Base {
public:
static void AddTask(Task *);
static std::vector<Task *>::iterator FindTask(Task *) throw (GeneralException);
static void RemoveFromWatches(Task *);
+ static void RemoveTimeout(Task *);
static void Init() throw (GeneralException);
static void MainLoop() throw (GeneralException);
static void WaitFor(Handle *, Task *, int = 0);
static void WaitFor(pid_t, Task *, int = 0);
- static void WaitFor(timeval, Task *, int = 0);
+ static void WaitFor(const timeval &, Task *, int = 0);
static int GotChild(pid_t, int);
static void Stop();
static int Event();
@@ -35,10 +30,10 @@ class TaskMan : public Base {
class w4ha_t {
public:
- w4ha_t(Handle * aha, int aflags, Task * aT) : ha(aha), flags(aflags), dirthy(true), T(aT) { }
+ w4ha_t(Handle * aha, int aflags, Task * aT) : ha(aha), flags(aflags), dirty(true), T(aT) { }
Handle * ha;
int flags;
- bool dirthy;
+ bool dirty;
Task * T;
};
@@ -52,7 +47,7 @@ class TaskMan : public Base {
class w4to_t {
public:
- w4to_t(timeval ato, int aflags, Task * aT) : to(ato), flags(aflags), T(aT) { }
+ w4to_t(const timeval & ato, int aflags, Task * aT) : to(ato), flags(aflags), T(aT) { }
timeval to;
int flags;
Task * T;
@@ -73,6 +68,9 @@ class TaskMan : public Base {
static Handle * ehandle;
static int eprocess, estatus;
static sigset_t sigchildset;
+ static int got_sigchild;
+ static bool CheckDead(Task *);
+ static void SigChild();
};
#endif