Displaying 2 results from an estimated 2 matches for "shma".
Did you mean:
sha
2012 Mar 28
0
[PATCH] tools/memshr: fix build errors caused by Werror
...mshr_info_t));
if((SHARED_INFO = shm_shared_info_open(1)) == NULL)
diff -r 4bd752a4cdf3 -r d0fe664fca8a tools/memshr/shm.c
--- a/tools/memshr/shm.c
+++ b/tools/memshr/shm.c
@@ -81,12 +81,6 @@ static int shm_area_open(const char *fil
return 0;
}
-static void shm_area_close(shm_area_t *shma)
-{
- munmap(shma->base_addr, shma->size);
- close(shma->fd);
-}
-
shared_memshr_info_t * shm_shared_info_open(int unlink)
{
2012 Mar 28
1
Re: tools/memshr: fix build errors caused by Werror
...= shm_shared_info_open(1)) == NULL)
> diff -r 4bd752a4cdf3 -r d0fe664fca8a tools/memshr/shm.c
> --- a/tools/memshr/shm.c
> +++ b/tools/memshr/shm.c
> @@ -81,12 +81,6 @@ static int shm_area_open(const char *fil
> return 0;
> }
>
> -static void shm_area_close(shm_area_t *shma)
> -{
> - munmap(shma->base_addr, shma->size);
> - close(shma->fd);
> -}
> -
Removing the close handler is not The Right Thing To Do. Rather, invoke
the close handler where necessary.
Unfortunately, memshr seems blatantly devoid of any cleanup handling. The
problem s...