From 03256707111ce2409de0857c65482512e42d9238 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Wed, 6 Jul 2016 17:13:06 +0200 Subject: lib: shm_du_map: Clean sdus upon exit When an application closes the shm_du_map, it will clean all remaining sdu's for that application. Adds a function to clean the shm_du_map on close. Fixes #20. --- src/lib/shm_ap_rbuff.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/lib/shm_ap_rbuff.c') diff --git a/src/lib/shm_ap_rbuff.c b/src/lib/shm_ap_rbuff.c index e90afe19..4eb91136 100644 --- a/src/lib/shm_ap_rbuff.c +++ b/src/lib/shm_ap_rbuff.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #define SHM_RBUFF_FILE_SIZE (SHM_RBUFF_SIZE * sizeof(struct rb_entry) \ @@ -161,7 +162,7 @@ struct shm_ap_rbuff * shm_ap_rbuff_open(pid_t api) shm_fd = shm_open(fn, O_RDWR, 0666); if (shm_fd == -1) { - LOG_DBGF("Failed opening shared memory %s.", fn); + LOG_DBGF("%d failed opening shared memory %s.", getpid(), fn); return NULL; } -- cgit v1.2.3