From b8c85b6743ec7855b07084596535878c1004a2d8 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Sun, 10 May 2026 21:48:23 -0400 Subject: Handle error for mapping pool --- src/lib/core/multiprocessing.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/lib/core/multiprocessing.c b/src/lib/core/multiprocessing.c index 9246daa..14a8ae6 100644 --- a/src/lib/core/multiprocessing.c +++ b/src/lib/core/multiprocessing.c @@ -544,6 +544,10 @@ struct MultiProcessingPool *mp_pool_init(const char *ident, const char *log_root // The pool is shared with children pool = mmap(NULL, sizeof(*pool), PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0); + if (pool == MAP_FAILED) { + SYSERROR("unable to memory map pool"); + return NULL; + } // Set pool identity string memset(pool->ident, 0, sizeof(pool->ident)); -- cgit