diff options
author | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-07-06 21:27:02 +0200 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-07-06 21:27:02 +0200 |
commit | c2aa47de8ae4dde6d2fa787bcd4caf5801b28aaf (patch) | |
tree | cb13d43a7b091203356f0fa55eb23259bd294b4d /src | |
parent | 1ddc75c877f00a05669d1854d6196409428ea223 (diff) | |
download | ouroboros-c2aa47de8ae4dde6d2fa787bcd4caf5801b28aaf.tar.gz ouroboros-c2aa47de8ae4dde6d2fa787bcd4caf5801b28aaf.zip |
lib: shm_du_map: Fix cleaning stale DU map
Added check if the owner of the du map is actually running so a new
IRMd instance can remove a stale DU map.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/shm_du_map.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/shm_du_map.c b/src/lib/shm_du_map.c index 1c9155a0..53959676 100644 --- a/src/lib/shm_du_map.c +++ b/src/lib/shm_du_map.c @@ -390,7 +390,7 @@ void shm_du_map_destroy(struct shm_du_map * dum) return; } - if (getpid() != *dum->api) { + if (getpid() != *dum->api && kill(*dum->api, 0) == 0) { LOG_DBGF("Only IRMd can destroy %s.", SHM_DU_MAP_FILENAME); return; } |