summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham.Dumpleton <devnull@localhost>2008-08-23 13:28:00 +0000
committerGraham.Dumpleton <devnull@localhost>2008-08-23 13:28:00 +0000
commit55118c0a2283ee44a7efaf17b258d27e781e0625 (patch)
tree57c91ac9f50c7ad71b1e89a2dae5469efe2ff19a
parent0d8b65a827825f9905a771cb7f6cdacc65e25d54 (diff)
downloadmod_wsgi-55118c0a2283ee44a7efaf17b258d27e781e0625.tar.gz
First argument to setproctitle() should be format string. Incorrect NULL2.3
argument when registering pool cleanup function.
-rw-r--r--mod_wsgi.c9
1 files 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