summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_php_sapi.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2018-06-28 18:31:13 +0300
committerIgor Sysoev <igor@sysoev.ru>2018-06-28 18:31:13 +0300
commit50228b35b6e8cd42f14ce12a973fec2d65d2d8db (patch)
tree062495b02c099dfce46c76f534fadcd7d911c85e /src/nxt_php_sapi.c
parent51b37f06932f4e1f7612afbd74348970af3a341d (diff)
downloadunit-50228b35b6e8cd42f14ce12a973fec2d65d2d8db.tar.gz
unit-50228b35b6e8cd42f14ce12a973fec2d65d2d8db.tar.bz2
Removed usage of nxt_thread_context in loadable modules.
This change allows to use __thread class storage on MacOSX.
Diffstat (limited to 'src/nxt_php_sapi.c')
-rw-r--r--src/nxt_php_sapi.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nxt_php_sapi.c b/src/nxt_php_sapi.c
index f495364a..25324aad 100644
--- a/src/nxt_php_sapi.c
+++ b/src/nxt_php_sapi.c
@@ -175,6 +175,9 @@ NXT_EXPORT nxt_application_module_t nxt_app_module = {
};
+static nxt_task_t *nxt_php_task;
+
+
nxt_inline u_char *
nxt_realpath(const void *c)
{
@@ -195,6 +198,8 @@ nxt_php_init(nxt_task_t *task, nxt_common_app_conf_t *conf)
static nxt_str_t user_str = nxt_string("user");
static nxt_str_t admin_str = nxt_string("admin");
+ nxt_php_task = task;
+
c = &conf->u.php;
if (c->root == NULL) {
@@ -866,5 +871,5 @@ static void
nxt_php_log_message(char *message)
#endif
{
- nxt_thread_log_error(NXT_LOG_NOTICE, "php message: %s", message);
+ nxt_log(nxt_php_task, NXT_LOG_NOTICE, "php message: %s", message);
}