summaryrefslogtreecommitdiff
path: root/manager.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-01-27 04:31:52 +0100
committerLennart Poettering <lennart@poettering.net>2010-01-27 04:31:52 +0100
commitacbb02252a38214ecba3aa8a5c9b3669f9c9317e (patch)
tree6c1d40078a245cd4b94d46b00f273cd5b9514aeb /manager.h
parentb858b600e46f4a25ddc9fb980e5a73ca5aa2690f (diff)
yay, we can start socket units
Diffstat (limited to 'manager.h')
-rw-r--r--manager.h25
1 files changed, 17 insertions, 8 deletions
diff --git a/manager.h b/manager.h
index a17a6c2f6d..303201b74d 100644
--- a/manager.h
+++ b/manager.h
@@ -8,7 +8,21 @@
#include <stdio.h>
typedef struct Manager Manager;
-typedef enum ManagerEventType ManagerEventType;
+typedef enum WatchType WatchType;
+typedef struct Watch Watch;
+
+enum WatchType {
+ WATCH_INVALID,
+ WATCH_SIGNAL_FD,
+ WATCH_FD,
+ WATCH_TIMER
+};
+
+struct Watch {
+ int fd;
+ WatchType type;
+ union Unit *unit;
+};
#include "unit.h"
#include "job.h"
@@ -16,12 +30,6 @@ typedef enum ManagerEventType ManagerEventType;
#include "list.h"
#include "set.h"
-enum ManagerEventType {
- MANAGER_SIGNAL,
- MANAGER_FD,
- MANAGER_TIMER
-};
-
struct Manager {
uint32_t current_job_id;
@@ -49,7 +57,8 @@ struct Manager {
Hashmap *watch_pids; /* pid => Unit object n:1 */
int epoll_fd;
- int signal_fd;
+
+ Watch signal_watch;
};
Manager* manager_new(void);