|
|
dd7be8 |
|
|
|
dd7be8 |
Log exit status in daemon manager; improves diagnosics.
|
|
|
dd7be8 |
|
|
|
dd7be8 |
http://code.google.com/p/modwsgi/source/detail?path=/mod_wsgi.c&name=mod_wsgi-3.X&r=b4f55d756fa816a7eae0f7edc13d5f2da3f3d5c1
|
|
|
dd7be8 |
|
|
|
dd7be8 |
--- mod_wsgi-3.3/mod_wsgi.c.procexit
|
|
|
dd7be8 |
+++ mod_wsgi-3.3/mod_wsgi.c
|
|
|
dd7be8 |
@@ -9845,6 +9845,20 @@ static void wsgi_manage_process(int reas
|
|
|
dd7be8 |
wsgi_server, "mod_wsgi (pid=%d): "
|
|
|
dd7be8 |
"Process '%s' has died, restarting.",
|
|
|
dd7be8 |
daemon->process.pid, daemon->group->name);
|
|
|
dd7be8 |
+ if (WIFEXITED(status)) {
|
|
|
dd7be8 |
+ ap_log_error(APLOG_MARK, WSGI_LOG_INFO(0),
|
|
|
dd7be8 |
+ wsgi_server, "mod_wsgi (pid=%d): "
|
|
|
dd7be8 |
+ "Process '%s' terminated normally, exit code %d",
|
|
|
dd7be8 |
+ daemon->process.pid, daemon->group->name,
|
|
|
dd7be8 |
+ WEXITSTATUS(status));
|
|
|
dd7be8 |
+ }
|
|
|
dd7be8 |
+ else if (WIFSIGNALED(status)) {
|
|
|
dd7be8 |
+ ap_log_error(APLOG_MARK, WSGI_LOG_INFO(0),
|
|
|
dd7be8 |
+ wsgi_server, "mod_wsgi (pid=%d): "
|
|
|
dd7be8 |
+ "Process '%s' terminated by signal %d",
|
|
|
dd7be8 |
+ daemon->process.pid, daemon->group->name,
|
|
|
dd7be8 |
+ WTERMSIG(status));
|
|
|
dd7be8 |
+ }
|
|
|
dd7be8 |
|
|
|
dd7be8 |
wsgi_start_process(wsgi_parent_pool, daemon);
|
|
|
dd7be8 |
}
|