path: root/include
diff options
authorPablo Neira Ayuso <>2009-05-23 12:09:06 +0200
committerPablo Neira Ayuso <>2009-05-23 12:09:06 +0200
commit0374398fd14bf587d80d9d31e361e266e69387c8 (patch)
tree2984629205760d10660fa43c237073e555ce03c8 /include
parent91bf01ee31b754bb17f612ee13685ef0ffe9baa8 (diff)
conntrackd: add child process infrastructure
This patch adds a simple infrastructure that allows to account the child processes that have been forked. This also includes a callback handler that can be registered that is called once the child process finishes. We can extended this later to include an alarm to limit the maximum lifetime of a forked child process. This is good to ensure that child processes behave timely. Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'include')
2 files changed, 16 insertions, 1 deletions
diff --git a/include/ b/include/
index f02ce89..0ea056c 100644
--- a/include/
+++ b/include/
@@ -3,5 +3,6 @@ noinst_HEADERS = alarm.h jhash.h cache.h linux_list.h linux_rbtree.h \
sync.h conntrackd.h local.h udp.h \
debug.h log.h hash.h mcast.h conntrack.h \
network.h filter.h queue.h vector.h cidr.h \
- traffic_stats.h netlink.h fds.h event.h bitops.h channel.h
+ traffic_stats.h netlink.h fds.h event.h bitops.h channel.h \
+ process.h
diff --git a/include/process.h b/include/process.h
new file mode 100644
index 0000000..a7f07ea
--- /dev/null
+++ b/include/process.h
@@ -0,0 +1,14 @@
+#ifndef _PROCESS_H_
+#define _PROCESS_H_
+struct child_process {
+ struct list_head head;
+ int pid;
+ void (*cb)(void *data);
+ void *data;
+int fork_process_new(void (*cb)(void *data), void *data);
+int fork_process_delete(int pid);