From 4f712e3fd0c2c8f1e91b11dce5596b995ef69985 Mon Sep 17 00:00:00 2001 From: Sergey Kandaurov Date: Tue, 6 Mar 2018 13:55:51 +0000 Subject: Added support for shm_open(SHM_ANON) extension. --- src/go/unit/nxt_go_port_memory.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/go/unit') diff --git a/src/go/unit/nxt_go_port_memory.c b/src/go/unit/nxt_go_port_memory.c index 7a226672..89530fe8 100644 --- a/src/go/unit/nxt_go_port_memory.c +++ b/src/go/unit/nxt_go_port_memory.c @@ -64,6 +64,18 @@ nxt_go_new_port_mmap(nxt_go_process_t *process, nxt_port_id_t id, nxt_go_debug("memfd_create(%s): %d", name, fd); +#elif (NXT_HAVE_SHM_OPEN_ANON) + + fd = shm_open(SHM_ANON, O_RDWR, S_IRUSR | S_IWUSR); + + nxt_go_debug("shm_open(SHM_ANON): %d", fd); + + if (nxt_slow_path(fd == -1)) { + nxt_go_warn("shm_open(SHM_ANON) failed %d", errno); + + goto remove_fail; + } + #elif (NXT_HAVE_SHM_OPEN) /* Just in case. */ -- cgit