Skip to content

Commit 0605709

Browse files
committed
bugfix: fixed compatibility regressions on Win32. this regression had appeared in commit 012f316.
1 parent f341daa commit 0605709

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/ngx_http_lua_initworkerby.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,15 @@ ngx_http_lua_init_worker(ngx_cycle_t *cycle)
4646

4747
/* lmcf != NULL && lmcf->lua != NULL */
4848

49-
/* disable init_worker_by_lua* and destroy lua VM in cache processes */
49+
#if !(NGX_WIN32)
5050
if (ngx_process == NGX_PROCESS_HELPER
51-
#if defined(HAVE_PRIVILEGED_PROCESS_PATCH) && !NGX_WIN32
51+
# ifdef HAVE_PRIVILEGED_PROCESS_PATCH
5252
&& !ngx_is_privileged_agent
53-
#endif
53+
# endif
5454
)
5555
{
56+
/* disable init_worker_by_lua* and destroy lua VM in cache processes */
57+
5658
ngx_log_debug2(NGX_LOG_DEBUG_HTTP, ngx_cycle->log, 0,
5759
"lua close the global Lua VM %p in the "
5860
"cache helper process %P", lmcf->lua, ngx_pid);
@@ -62,6 +64,7 @@ ngx_http_lua_init_worker(ngx_cycle_t *cycle)
6264

6365
return NGX_OK;
6466
}
67+
#endif /* NGX_WIN32 */
6568

6669
if (lmcf->init_worker_handler == NULL) {
6770
return NGX_OK;

0 commit comments

Comments
 (0)