diff --git a/uwsgi.c b/uwsgi.c index 33b9eef1..1d0c2713 100644 --- a/uwsgi.c +++ b/uwsgi.c @@ -606,6 +606,7 @@ int main (int argc, char *argv[], char *envp[]) { {"proxy-node", required_argument, 0, LONG_ARGS_PROXY_NODE}, {"proxy-max-connections", required_argument, 0, LONG_ARGS_PROXY_MAX_CONNECTIONS}, {"wsgi-file", required_argument, 0, LONG_ARGS_WSGI_FILE}, + {"version", no_argument, 0, LONG_ARGS_VERSION}, {0, 0, 0, 0} }; #endif @@ -684,12 +685,12 @@ int main (int argc, char *argv[], char *envp[]) { if (uwsgi.shared->options[UWSGI_OPTION_CGI_MODE] == 0) { #endif if (uwsgi.test_module == NULL) { - fprintf (stderr, "*** Starting uWSGI (%dbit) on [%.*s] ***\n", (int) (sizeof (void *)) * 8, 24, ctime ((const time_t *) &uwsgi.start_tv.tv_sec)); + fprintf (stderr, "*** Starting uWSGI %s (%dbit) on [%.*s] ***\n", UWSGI_VERSION, (int) (sizeof (void *)) * 8, 24, ctime ((const time_t *) &uwsgi.start_tv.tv_sec)); } #ifndef UNBIT } else { - fprintf (stderr, "*** Starting uWSGI (CGI mode) (%dbit) on [%.*s] ***\n", (int) (sizeof (void *)) * 8, 24, ctime ((const time_t *) &uwsgi.start_tv.tv_sec)); + fprintf (stderr, "*** Starting uWSGI %s (CGI mode) (%dbit) on [%.*s] ***\n", UWSGI_VERSION, (int) (sizeof (void *)) * 8, 24, ctime ((const time_t *) &uwsgi.start_tv.tv_sec)); } #endif @@ -2505,6 +2506,9 @@ void manage_opt(int i, char *optarg) { switch (i) { #ifndef UNBIT + case LONG_ARGS_VERSION: + fprintf(stdout,"uWSGI %s\n", UWSGI_VERSION); + exit(0); case LONG_ARGS_PIDFILE: uwsgi.pidfile = optarg; break; diff --git a/uwsgi.h b/uwsgi.h index 5bab60e9..c0057a15 100644 --- a/uwsgi.h +++ b/uwsgi.h @@ -3,6 +3,7 @@ /* indent -i8 -br -brs -brf -l0 -npsl */ +#define UWSGI_VERSION "0.9.5-dev" #include #include @@ -111,6 +112,7 @@ PyAPI_FUNC (PyObject *) PyMarshal_ReadObjectFromString (char *, Py_ssize_t); #define LONG_ARGS_PROXY 17015 #define LONG_ARGS_PROXY_NODE 17016 #define LONG_ARGS_PROXY_MAX_CONNECTIONS 17017 +#define LONG_ARGS_VERSION 17018 #define UWSGI_CLEAR_STATUS uwsgi.workers[uwsgi.mywid].status = 0 @@ -257,6 +259,8 @@ struct __attribute__ ((packed)) wsgi_request { int status; int response_size; int headers_size; + + int async_status ; };