libextractor

GNU libextractor
Log | Files | Refs | Submodules | README | LICENSE

commit cb080247ac32a846f72554a371ca69e3dd9080da
parent b7846948995576e768ce89d2cd0dd04d1e64de13
Author: Christian Grothoff <christian@grothoff.org>
Date:   Mon, 24 Sep 2012 22:25:57 +0000

-check if SHM creation failed, reduce SHM name length as OSX limits to 31 characters

Diffstat:
Msrc/main/extractor.c | 5+++++
Msrc/main/extractor_ipc_gnu.c | 2+-
2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/main/extractor.c b/src/main/extractor.c @@ -636,6 +636,11 @@ EXTRACTOR_extract (struct EXTRACTOR_PluginList *plugins, { /* need to create shared memory segment */ shm = EXTRACTOR_IPC_shared_memory_create_ (DEFAULT_SHM_SIZE); + if (NULL == shm) + { + LOG ("Failed to setup IPC\n"); + return; + } } for (pos = plugins; NULL != pos; pos = pos->next) if ( (NULL == pos->channel) && diff --git a/src/main/extractor_ipc_gnu.c b/src/main/extractor_ipc_gnu.c @@ -149,7 +149,7 @@ EXTRACTOR_IPC_shared_memory_create_ (size_t size) #endif snprintf (shm->shm_name, MAX_SHM_NAME, - "%slibextractor-shm-%u-%u", + "%sLE-%u-%u", tpath, getpid (), (unsigned int) RANDOM()); if (-1 == (shm->shm_id = shm_open (shm->shm_name,