summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordimitri staessens <[email protected]>2016-06-17 15:55:23 +0200
committerdimitri staessens <[email protected]>2016-06-17 16:01:20 +0200
commitdba896b9a0ca7cbe4fb379017672bd44a0a77ef0 (patch)
tree5aeee1a6f05aa4a35ceab97ba6a7da16979555a5 /include
parent1d196cfc0d87b6fd41ba15a3a7d17669711ed202 (diff)
downloadouroboros-dba896b9a0ca7cbe4fb379017672bd44a0a77ef0.tar.gz
ouroboros-dba896b9a0ca7cbe4fb379017672bd44a0a77ef0.zip
irmd, lib: use shm_du_map as lockfile.
Added the pid of the irmd to the shm_du_map. The IRMd will check for an existing shm_du_map. If there is an existing file, it will exit if the owner IRMd is running or remove it if the owner IRMd is not running. Also simplifies calculation of the shm_du_map pointers and corrects exiting calls for the IRMd. Fixes #8.
Diffstat (limited to 'include')
-rw-r--r--include/ouroboros/shm_du_map.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/ouroboros/shm_du_map.h b/include/ouroboros/shm_du_map.h
index cc1e8869..081a6f62 100644
--- a/include/ouroboros/shm_du_map.h
+++ b/include/ouroboros/shm_du_map.h
@@ -37,6 +37,7 @@
#endif
#include "common.h"
+#include <sys/types.h>
struct shm_du_buff;
struct shm_du_map;
@@ -45,6 +46,7 @@ struct shm_du_map * shm_du_map_create();
struct shm_du_map * shm_du_map_open();
void shm_du_map_close(struct shm_du_map * dum);
void shm_du_map_destroy(struct shm_du_map * dum);
+pid_t shm_du_map_owner(struct shm_du_map * dum);
/* returns the index of the buffer in the DU map */
ssize_t shm_create_du_buff(struct shm_du_map * dum,