diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-05-10 21:48:23 -0400 |
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-05-11 15:57:01 -0400 |
| commit | b8c85b6743ec7855b07084596535878c1004a2d8 (patch) | |
| tree | 287e5c87a8562f93bf5f29a91cd9d8c0fcfb2679 /src/lib | |
| parent | 6babfe77f8e728e8ddb2f2665563673e05f3f433 (diff) | |
| download | stasis-b8c85b6743ec7855b07084596535878c1004a2d8.tar.gz | |
Handle error for mapping pool
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/core/multiprocessing.c | 4 |
1 files changed, 4 insertions, 0 deletions
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)); |
