]> git.itanic.dy.fi Git - rrdd/blobdiff - process.h
process: Implement event handling infrastructure
[rrdd] / process.h
index 7d0e45a543ebc21ecd2b5e74b23bffc7a751138d..ae9db12b97457f90e5d4256c0e42e3ba5ffdb506 100644 (file)
--- a/process.h
+++ b/process.h
@@ -8,6 +8,20 @@
 #include <sys/wait.h>
 #include <error.h>
 #include <errno.h>
+#include <stdint.h>
+
+struct event_handler;
+
+typedef int (handle_event_fn_t)(struct event_handler *);
+
+struct event_handler {
+       int fd;
+       uint32_t events;
+       handle_event_fn_t *handle_event;
+       char *name;
+};
+
+int register_event_handler(struct event_handler *handler);
 
 int get_child_count(void);
 int get_parent_count(void);