Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 30 additions & 10 deletions src/server/wsgi_interp.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,10 +463,16 @@ InterpreterObject *newInterpreterObject(const char *name)
* be the case for the main Python interpreter.
*/

ap_log_error(APLOG_MARK, APLOG_INFO, 0, wsgi_server,
"mod_wsgi (pid=%d): Attach interpreter '%s'.",
getpid(), name);

if (*name) {
ap_log_error(APLOG_MARK, APLOG_INFO, 0, wsgi_server,
"mod_wsgi (pid=%d): Attach interpreter '%s'.",
getpid(), name);
}
else {
ap_log_error(APLOG_MARK, APLOG_INFO, 0, wsgi_server,
"mod_wsgi (pid=%d): Attach main interpreter.",
getpid());
}
self->interp = interp;
self->owner = 0;

Expand Down Expand Up @@ -1606,16 +1612,30 @@ static void Interpreter_dealloc(InterpreterObject *self)

if (self->owner) {
Py_BEGIN_ALLOW_THREADS
ap_log_error(APLOG_MARK, APLOG_INFO, 0, wsgi_server,
"mod_wsgi (pid=%d): Destroy interpreter '%s'.",
getpid(), self->name);
if (*self->name) {
ap_log_error(APLOG_MARK, APLOG_INFO, 0, wsgi_server,
"mod_wsgi (pid=%d): Destroy interpreter '%s'.",
getpid(), self->name);
}
else {
ap_log_error(APLOG_MARK, APLOG_INFO, 0, wsgi_server,
"mod_wsgi (pid=%d): Destroy main interpreter.",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not 100% whether destroy is also subject to main/sub handling.

getpid());
}
Py_END_ALLOW_THREADS
}
else {
Py_BEGIN_ALLOW_THREADS
ap_log_error(APLOG_MARK, APLOG_INFO, 0, wsgi_server,
"mod_wsgi (pid=%d): Cleanup interpreter '%s'.",
getpid(), self->name);
if (*self->name) {
ap_log_error(APLOG_MARK, APLOG_INFO, 0, wsgi_server,
"mod_wsgi (pid=%d): Cleanup interpreter '%s'.",
getpid(), self->name);
}
else {
ap_log_error(APLOG_MARK, APLOG_INFO, 0, wsgi_server,
"mod_wsgi (pid=%d): Cleanup main interpreter.",
getpid());
}
Py_END_ALLOW_THREADS
}

Expand Down