summaryrefslogtreecommitdiff
path: root/src/server/wsgi_interp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/wsgi_interp.c')
-rw-r--r--src/server/wsgi_interp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/server/wsgi_interp.c b/src/server/wsgi_interp.c
index 027325f..5209040 100644
--- a/src/server/wsgi_interp.c
+++ b/src/server/wsgi_interp.c
@@ -1,7 +1,7 @@
/* ------------------------------------------------------------------------- */
/*
- * Copyright 2007-2021 GRAHAM DUMPLETON
+ * Copyright 2007-2022 GRAHAM DUMPLETON
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -2069,6 +2069,11 @@ apr_status_t wsgi_python_term(void)
{
PyObject *module = NULL;
+ /* Skip destruction of Python interpreter. */
+
+ if (wsgi_server_config->destroy_interpreter == 0)
+ return APR_SUCCESS;
+
ap_log_error(APLOG_MARK, APLOG_INFO, 0, wsgi_server,
"mod_wsgi (pid=%d): Terminating Python.", getpid());