diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/irmd/main.c | 4 | ||||
-rw-r--r-- | src/lib/ipcp.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/irmd/main.c b/src/irmd/main.c index 68789e94..5f7c1ddc 100644 --- a/src/irmd/main.c +++ b/src/irmd/main.c @@ -1578,12 +1578,14 @@ static struct irm * irm_create() if (i == NULL) return NULL; - if (access(INSTALL_DIR "dev/shm/" SHM_DU_MAP_FILENAME, F_OK) != -1) { + if (access("/dev/shm/" SHM_DU_MAP_FILENAME, F_OK) != -1) { struct shm_du_map * dum = shm_du_map_open(); + if (dum == NULL) { LOG_ERR("Could not examine existing shm file."); exit(EXIT_FAILURE); } + if (kill(shm_du_map_owner(dum), 0) < 0) { LOG_INFO("IRMd didn't properly shut down last time."); shm_du_map_destroy(dum); diff --git a/src/lib/ipcp.c b/src/lib/ipcp.c index fcaf9f83..a43afd21 100644 --- a/src/lib/ipcp.c +++ b/src/lib/ipcp.c @@ -109,7 +109,7 @@ pid_t ipcp_create(char * ipcp_name, char * full_name = NULL; char * exec_name = NULL; - sprintf (irmd_pid, "%u", getpid()); + sprintf(irmd_pid, "%u", getpid()); pid = fork(); if (pid == -1) { |