summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_port_memory.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2017-07-10 21:07:12 +0300
committerIgor Sysoev <igor@sysoev.ru>2017-07-10 21:07:12 +0300
commit3bccb7f358e27f932c951a55bc17aa113bfae5f0 (patch)
tree78fc9f0fc0b20c7df284208db901eacc7dd6b6a8 /src/nxt_port_memory.c
parentdc874cd22ef7ec72fc6e5927b1695d4a12536625 (diff)
downloadunit-3bccb7f358e27f932c951a55bc17aa113bfae5f0.tar.gz
unit-3bccb7f358e27f932c951a55bc17aa113bfae5f0.tar.bz2
Introducing thread-safe nxt_random().
Diffstat (limited to '')
-rw-r--r--src/nxt_port_memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nxt_port_memory.c b/src/nxt_port_memory.c
index 6aaff5cf..38e7db70 100644
--- a/src/nxt_port_memory.c
+++ b/src/nxt_port_memory.c
@@ -217,7 +217,7 @@ nxt_port_new_port_mmap(nxt_task_t *task, nxt_process_t *process,
}
p = nxt_sprintf(name, name + sizeof(name), "/nginext.%PI.%uxD",
- nxt_pid, nxt_random(&nxt_random_data));
+ nxt_pid, nxt_random(&task->thread->random));
*p = '\0';
#if (NXT_HAVE_MEMFD_CREATE)