summaryrefslogtreecommitdiffstats
path: root/include/process.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2009-05-23 12:09:06 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2009-05-23 12:09:06 +0200
commit0374398fd14bf587d80d9d31e361e266e69387c8 (patch)
tree2984629205760d10660fa43c237073e555ce03c8 /include/process.h
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 <pablo@netfilter.org>
Diffstat (limited to 'include/process.h')
-rw-r--r--include/process.h14
1 files changed, 14 insertions, 0 deletions
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);
+
+#endif