From 4106931175bf285e2dc9cbc2d487142cba21547d Mon Sep 17 00:00:00 2001 From: "roberto@sirius" Date: Tue, 18 May 2010 07:06:07 +0200 Subject: [PATCH] fix getrlimit() --- simple_app.py | 2 +- uwsgi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/simple_app.py b/simple_app.py index cf3185ea..7d7c720e 100644 --- a/simple_app.py +++ b/simple_app.py @@ -1,5 +1,5 @@ def application(env, start_response): - #print env + print env start_response('200 Ok', [('Content-type', 'text/plain')]) yield "hello world" yield "hello world2" diff --git a/uwsgi.c b/uwsgi.c index 452912aa..2842434d 100644 --- a/uwsgi.c +++ b/uwsgi.c @@ -558,7 +558,7 @@ int main(int argc, char *argv[], char *envp[]) { if (!getrlimit(RLIMIT_AS, &uwsgi.rl)) { #ifndef UNBIT // check for overflow - if ((sizeof(void *) == 4 && (uint32_t) uwsgi.rl.rlim_max < UINT32_MAX) || (sizeof(void *) == 8 && (uint64_t) uwsgi.rl.rlim_max < UINT64_MAX)) { + if (uwsgi.rl.rlim_max != RLIM_INFINITY) { #endif uwsgi_log("your process address space limit is %lld bytes (%lld MB)\n", (long long) uwsgi.rl.rlim_max, (long long) uwsgi.rl.rlim_max / 1024 / 1024); #ifndef UNBIT