summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@intec.ugent.be>2016-05-22 21:17:12 +0200
committerSander Vrijders <sander.vrijders@intec.ugent.be>2016-05-22 21:17:12 +0200
commitca0d5f79a77cc56d529d40f5802d9772ab729703 (patch)
tree37ebb2d5c4d5a266f6e298fc7960aa609c07bc0e /src
parent467e504993c1cb0351dc3e279e7aeab8e5df333f (diff)
parent9544da4a44f40f8c90b56b816a28fc6ac566d85d (diff)
downloadouroboros-ca0d5f79a77cc56d529d40f5802d9772ab729703.tar.gz
ouroboros-ca0d5f79a77cc56d529d40f5802d9772ab729703.zip
Merged in dstaesse/ouroboros/irmd-unique (pull request #107)0.1
irmd: use the shm_du_map as a uniqueness check
Diffstat (limited to 'src')
-rw-r--r--src/irmd/main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/irmd/main.c b/src/irmd/main.c
index a33fae84..b84c3327 100644
--- a/src/irmd/main.c
+++ b/src/irmd/main.c
@@ -1487,8 +1487,13 @@ static struct irm * irm_create()
if (i == NULL)
return NULL;
- if (access("/dev/shm/" SHM_DU_MAP_FILENAME, F_OK) != -1)
- unlink("/dev/shm/" SHM_DU_MAP_FILENAME);
+ if (access("/dev/shm/" SHM_DU_MAP_FILENAME, F_OK) != -1) {
+ LOG_ERR("IRM daemon is running in this system.");
+ LOG_ERR("If you think this message is in error,");
+ LOG_ERR("please remove /dev/shm/" SHM_DU_MAP_FILENAME);
+ LOG_ERR("(root privileges required) or reboot your system.");
+ return NULL;
+ }
i->threadpool = malloc(sizeof(pthread_t) * IRMD_THREADPOOL_SIZE);
if (i->threadpool == NULL) {