Skip to content

Commit 9569091

Browse files
Fix Windows compile failure from unguarded daemon shutdown flag.
The script preload loop in wsgi_python_child_init referenced wsgi_daemon_shutdown without a MOD_WSGI_WITH_DAEMONS guard. That variable is only declared when daemon mode is available, which is never the case on Windows, so compilation failed with C2065. Wrap the reference in the conditional to match the other uses.
1 parent e8e9e51 commit 9569091

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

docs/release-notes/version-6.0.1.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,10 @@ Bugs Fixed
2828
being updated to the buffer protocol. It now accepts any bytes-like
2929
object. For backward compatibility a ``str`` is still accepted, but
3030
doing so is now deprecated and will emit a ``DeprecationWarning``.
31+
32+
* Compilation failed on Windows with ``error C2065: 'wsgi_daemon_shutdown':
33+
undefined variable``. The script preload loop referenced the daemon
34+
shutdown flag without guarding it with ``MOD_WSGI_WITH_DAEMONS``, but
35+
that variable is only declared when daemon mode is available, which is
36+
never the case on Windows. The reference is now protected by the
37+
appropriate conditional.

src/server/wsgi_interp.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3456,8 +3456,10 @@ apr_status_t wsgi_python_child_init(apr_pool_t *p)
34563456
* we have already been flagged to be shutdown.
34573457
*/
34583458

3459+
#if defined(MOD_WSGI_WITH_DAEMONS)
34593460
if (wsgi_daemon_shutdown)
34603461
break;
3462+
#endif
34613463

34623464
if (!strcmp(wsgi_daemon_group, entry->process_group))
34633465
{

0 commit comments

Comments
 (0)