summaryrefslogtreecommitdiffstats
path: root/mod_wsgi-3.4-procexit.patch
blob: fc23c9641c67bd2eacc565d3d3d0f2d20a42ab6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--- mod_wsgi-3.3/mod_wsgi.c.procexit
+++ mod_wsgi-3.3/mod_wsgi.c
@@ -9845,6 +9845,20 @@ static void wsgi_manage_process(int reas
                              wsgi_server, "mod_wsgi (pid=%d): "
                              "Process '%s' has died, restarting.",
                              daemon->process.pid, daemon->group->name);
+                if (WIFEXITED(status)) {
+                    ap_log_error(APLOG_MARK, WSGI_LOG_INFO(0),
+                                 wsgi_server, "mod_wsgi (pid=%d): "
+                                 "Process '%s' terminated normally, exit code %d", 
+                                 daemon->process.pid, daemon->group->name,
+                                 WEXITSTATUS(status));
+                }
+                else if (WIFSIGNALED(status)) {
+                    ap_log_error(APLOG_MARK, WSGI_LOG_INFO(0),
+                                 wsgi_server, "mod_wsgi (pid=%d): "
+                                 "Process '%s' terminated by signal %d", 
+                                 daemon->process.pid, daemon->group->name,
+                                 WTERMSIG(status));
+                }
 
                 wsgi_start_process(wsgi_parent_pool, daemon);
             }