aboutsummaryrefslogtreecommitdiff
path: root/src/common/include/proc.h
diff options
context:
space:
mode:
authorAlex Auvolat <alex.auvolat@ens.fr>2015-03-02 23:30:16 +0100
committerAlex Auvolat <alex.auvolat@ens.fr>2015-03-03 00:07:27 +0100
commitbb1a5fc74769301c0a792cb83d3fa0bda8a780cb (patch)
tree14b406cc83798524e12d24ab211c4580d1c52f1f /src/common/include/proc.h
parent0d47724c5f6201fdc7679327ad4a132c708b8042 (diff)
downloadkogata-bb1a5fc74769301c0a792cb83d3fa0bda8a780cb.tar.gz
kogata-bb1a5fc74769301c0a792cb83d3fa0bda8a780cb.zip
Add prototypes for process management...
Diffstat (limited to 'src/common/include/proc.h')
-rw-r--r--src/common/include/proc.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/common/include/proc.h b/src/common/include/proc.h
new file mode 100644
index 0000000..01a6722
--- /dev/null
+++ b/src/common/include/proc.h
@@ -0,0 +1,18 @@
+#pragma once
+
+#include <stddef.h>
+#include <stdint.h>
+
+#define PS_LOADING 1
+#define PS_RUNNING 2
+#define PS_DONE 3
+#define PS_FAILURE 4 // exception or segfault or stuff
+#define PS_KILLED 5
+
+typedef struct {
+ int pid;
+ int state; // one of PS_*
+ int return_code; // an error code if state == PS_FAILURE
+} proc_status_t;
+
+/* vim: set ts=4 sw=4 tw=0 noet :*/