From 55118c0a2283ee44a7efaf17b258d27e781e0625 Mon Sep 17 00:00:00 2001 From: "Graham.Dumpleton" Date: Sat, 23 Aug 2008 13:28:00 +0000 Subject: First argument to setproctitle() should be format string. Incorrect NULL argument when registering pool cleanup function. --- mod_wsgi.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/mod_wsgi.c b/mod_wsgi.c index 926fb5f..c8bb891 100644 --- a/mod_wsgi.c +++ b/mod_wsgi.c @@ -246,7 +246,7 @@ static char *apr_off_t_toa(apr_pool_t *p, apr_off_t n) #define MOD_WSGI_MAJORVERSION_NUMBER 2 #define MOD_WSGI_MINORVERSION_NUMBER 2 -#define MOD_WSGI_VERSION_STRING "2.2" +#define MOD_WSGI_VERSION_STRING "2.3" #if AP_SERVER_MAJORVERSION_NUMBER < 2 module MODULE_VAR_EXPORT wsgi_module; @@ -7725,10 +7725,12 @@ static void wsgi_setup_daemon_name(WSGIDaemonProcess *daemon, apr_pool_t *p) { const char *display_name = NULL; +#if !(defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) int slen = 0; int dlen = 0; char *argv0 = NULL; +#endif display_name = daemon->group->display_name; @@ -7748,7 +7750,7 @@ static void wsgi_setup_daemon_name(WSGIDaemonProcess *daemon, apr_pool_t *p) */ #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) - setproctitle(display_name); + setproctitle("%s", display_name); #else argv0 = (char*)wsgi_server->process->argv[0]; @@ -8873,7 +8875,8 @@ static int wsgi_start_daemons(apr_pool_t *p) * up properly on a restart and on shutdown. */ - apr_pool_cleanup_register(p, entry, wsgi_cleanup_process, NULL); + apr_pool_cleanup_register(p, entry, wsgi_cleanup_process, + apr_pool_cleanup_null); /* * If there is more than one daemon process in the group -- cgit v1.2.1