Skip to content

Commit

Permalink
Merge branch 'release/4.6.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamDumpleton committed Apr 3, 2018
2 parents fc3d6dd + a4ddd9f commit 3781411
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/release-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Release Notes
.. toctree::
:maxdepth: 2

release-notes/version-4.6.4
release-notes/version-4.6.3
release-notes/version-4.6.2
release-notes/version-4.6.1
Expand Down
25 changes: 25 additions & 0 deletions docs/release-notes/version-4.6.4.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
=============
Version 4.6.4
=============

Version 4.6.4 of mod_wsgi can be obtained from:

https://codeload.github.com/GrahamDumpleton/mod_wsgi/tar.gz/4.6.4

Bugs Fixed
----------

* In more recent Python versions, the config directory in the Python
installation incorporates the platform name. This directory was added as
an additional directory to search for Python shared libraries when
installing using the ``setup.py`` file or ``pip``. It should not even be
needed for newer Python versions but still check for older Python
versions. The only issue arising from the wrong directory, not incorporating
the platform name, being used, was a linker warning about the directory
not being present.

* Installing mod_wsgi on Windows would fail as hadn't exclude mod_wsgi
daemon mode specific code from Windows build. This would result in compile
time error about ``wsgi_daemon_process`` being undefined. This problem
was introduced to Windows in version 4.6.0. A prior attempt to fix this
in 4.6.3 missed one place in the code which needed to be changed.
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,8 @@ def get_apu_includes():

if PYTHON_LDVERSION and PYTHON_LDVERSION != PYTHON_VERSION:
PYTHON_CFGDIR = '%s-%s' % (PYTHON_CFGDIR, PYTHON_LDVERSION)
if not os.path.exists(PYTHON_CFGDIR):
PYTHON_CFGDIR = '%s-%s' % (PYTHON_CFGDIR, sys.platform)

PYTHON_LDFLAGS = ['-L%s' % PYTHON_LIBDIR, '-L%s' % PYTHON_CFGDIR]
PYTHON_LDLIBS = ['-lpython%s' % PYTHON_LDVERSION]
Expand Down
4 changes: 4 additions & 0 deletions src/server/mod_wsgi.c
Original file line number Diff line number Diff line change
Expand Up @@ -4248,8 +4248,12 @@ static apr_status_t wsgi_python_child_cleanup(void *data)
* before trying to wait on request threads.
*/

#if defined(MOD_WSGI_WITH_DAEMONS)
if (!wsgi_daemon_process)
wsgi_publish_process_stopping(wsgi_shutdown_reason);
#else
wsgi_publish_process_stopping(wsgi_shutdown_reason);
#endif

/* In a multithreaded MPM must protect table. */

Expand Down
13 changes: 11 additions & 2 deletions src/server/wsgi_interp.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,8 @@ InterpreterObject *newInterpreterObject(const char *name)
int is_threaded = 0;
int is_forked = 0;

int is_service_script = 0;

const char *str = NULL;

/* Create handle for interpreter and local data. */
Expand Down Expand Up @@ -595,7 +597,10 @@ InterpreterObject *newInterpreterObject(const char *name)
* registering signal handlers so they are ignored.
*/

#if defined(MOD_WSGI_WITH_DAEMONS)
if (wsgi_daemon_process && wsgi_daemon_process->group->threads == 0) {
is_service_script = 1;

module = PyImport_ImportModule("signal");

if (module) {
Expand Down Expand Up @@ -637,7 +642,9 @@ InterpreterObject *newInterpreterObject(const char *name)

Py_XDECREF(module);
}
else if (wsgi_server_config->restrict_signal != 0) {
#endif

if (!is_service_script && wsgi_server_config->restrict_signal != 0) {
module = PyImport_ImportModule("signal");

if (module) {
Expand Down Expand Up @@ -2057,17 +2064,19 @@ apr_status_t wsgi_python_term(void)
* condition.
*/

#if defined(MOD_WSGI_WITH_DAEMONS)
if (wsgi_daemon_process)
apr_thread_mutex_lock(wsgi_shutdown_lock);

#if defined(MOD_WSGI_WITH_DAEMONS)
wsgi_daemon_shutdown++;
#endif

Py_Finalize();

#if defined(MOD_WSGI_WITH_DAEMONS)
if (wsgi_daemon_process)
apr_thread_mutex_unlock(wsgi_shutdown_lock);
#endif

wsgi_python_initialized = 0;

Expand Down
4 changes: 2 additions & 2 deletions src/server/wsgi_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

#define MOD_WSGI_MAJORVERSION_NUMBER 4
#define MOD_WSGI_MINORVERSION_NUMBER 6
#define MOD_WSGI_MICROVERSION_NUMBER 3
#define MOD_WSGI_VERSION_STRING "4.6.3"
#define MOD_WSGI_MICROVERSION_NUMBER 4
#define MOD_WSGI_VERSION_STRING "4.6.4"

/* ------------------------------------------------------------------------- */

Expand Down

0 comments on commit 3781411

Please sign in to comment.