76920be
--- mod_wsgi-3.3/mod_wsgi.c.procexit
76920be
+++ mod_wsgi-3.3/mod_wsgi.c
76920be
@@ -9845,6 +9845,20 @@ static void wsgi_manage_process(int reas
76920be
                              wsgi_server, "mod_wsgi (pid=%d): "
76920be
                              "Process '%s' has died, restarting.",
76920be
                              daemon->process.pid, daemon->group->name);
76920be
+                if (WIFEXITED(status)) {
6e3a0df
+                    ap_log_error(APLOG_MARK, WSGI_LOG_INFO(0),
76920be
+                                 wsgi_server, "mod_wsgi (pid=%d): "
76920be
+                                 "Process '%s' terminated normally, exit code %d", 
76920be
+                                 daemon->process.pid, daemon->group->name,
76920be
+                                 WEXITSTATUS(status));
76920be
+                }
76920be
+                else if (WIFSIGNALED(status)) {
6e3a0df
+                    ap_log_error(APLOG_MARK, WSGI_LOG_INFO(0),
76920be
+                                 wsgi_server, "mod_wsgi (pid=%d): "
76920be
+                                 "Process '%s' terminated by signal %d", 
76920be
+                                 daemon->process.pid, daemon->group->name,
76920be
+                                 WTERMSIG(status));
76920be
+                }
76920be
 
76920be
                 wsgi_start_process(wsgi_parent_pool, daemon);
76920be
             }