diff options
author | Sergey Kandaurov <pluknet@nginx.com> | 2018-03-06 13:55:51 +0000 |
---|---|---|
committer | Sergey Kandaurov <pluknet@nginx.com> | 2018-03-06 13:55:51 +0000 |
commit | 4f712e3fd0c2c8f1e91b11dce5596b995ef69985 (patch) | |
tree | d0e8f69d492c842fa027c7aa57a30f10c4623039 /src/nxt_port_memory.c | |
parent | 30a32c2f09d954ee85be86e202828eab851311d6 (diff) | |
download | unit-4f712e3fd0c2c8f1e91b11dce5596b995ef69985.tar.gz unit-4f712e3fd0c2c8f1e91b11dce5596b995ef69985.tar.bz2 |
Added support for shm_open(SHM_ANON) extension.
Diffstat (limited to 'src/nxt_port_memory.c')
-rw-r--r-- | src/nxt_port_memory.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nxt_port_memory.c b/src/nxt_port_memory.c index f660b1b4..208c8b13 100644 --- a/src/nxt_port_memory.c +++ b/src/nxt_port_memory.c @@ -297,6 +297,18 @@ nxt_port_new_port_mmap(nxt_task_t *task, nxt_process_t *process, nxt_debug(task, "memfd_create(%s): %FD", name, fd); +#elif (NXT_HAVE_SHM_OPEN_ANON) + + fd = shm_open(SHM_ANON, O_RDWR, S_IRUSR | S_IWUSR); + + nxt_debug(task, "shm_open(SHM_ANON): %FD", fd); + + if (nxt_slow_path(fd == -1)) { + nxt_alert(task, "shm_open(SHM_ANON) failed %E", nxt_errno); + + goto remove_fail; + } + #elif (NXT_HAVE_SHM_OPEN) /* Just in case. */ |