mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-06 05:31:44 +00:00
fix python version printing on freeky systems
This commit is contained in:
@@ -151,7 +151,7 @@ int uwsgi_python_init() {
|
||||
#ifndef UWSGI_PYPY
|
||||
char *pyversion = strchr(Py_GetVersion(), '\n');
|
||||
if (!pyversion) {
|
||||
uwsgi_log_initial("Python version: %s %s\n", Py_GetVersion(), Py_GetCompiler()+1);
|
||||
uwsgi_log_initial("Python version: %s\n", Py_GetVersion());
|
||||
}
|
||||
else {
|
||||
uwsgi_log_initial("Python version: %.*s %s\n", pyversion-Py_GetVersion(), Py_GetVersion(), Py_GetCompiler()+1);
|
||||
|
||||
@@ -1654,6 +1654,12 @@ int main(int argc, char *argv[], char *envp[]) {
|
||||
uwsgi_log_initial("*** big endian arch detected ***\n");
|
||||
#endif
|
||||
|
||||
#if defined(_SC_NPROCESSORS_ONLN)
|
||||
uwsgi_log_initial("detected number of CPU cores: %d\n", sysconf(_SC_NPROCESSORS_ONLN));
|
||||
#elif defined(_SC_NPROCESSORS_CONF)
|
||||
uwsgi_log_initial("detected number of CPU cores: %d\n", sysconf(_SC_NPROCESSORS_CONF));
|
||||
#endif
|
||||
|
||||
|
||||
uwsgi_log_initial("current working directory: %s\n", uwsgi.cwd);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user