Introducing thread-safe nxt_random().

This commit is contained in:
Igor Sysoev
2017-07-10 21:07:12 +03:00
parent dc874cd22e
commit 3bccb7f358
9 changed files with 12 additions and 32 deletions

View File

@@ -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)