diff options
author | Graham Dumpleton <Graham.Dumpleton@gmail.com> | 2021-05-14 12:45:29 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-14 12:45:29 +1000 |
commit | 0d64bbcaa5187305a05345bd22c2e589d82d69f0 (patch) | |
tree | 71212180fc85a69dcdd9d446104cd01fb072204d /src/server | |
parent | b05ad1144aa39703c6ae6de78dcf617b0ed29ca3 (diff) | |
parent | ff7520e7f4b41c011366347ff48fd8008c549353 (diff) | |
download | mod_wsgi-0d64bbcaa5187305a05345bd22c2e589d82d69f0.tar.gz |
Merge pull request #669 from praiskup/errno-settrlimit
Log the reason for settrlimit() failures (errno).
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/mod_wsgi.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/server/mod_wsgi.c b/src/server/mod_wsgi.c index 04e3069..ebc67a2 100644 --- a/src/server/mod_wsgi.c +++ b/src/server/mod_wsgi.c @@ -10152,6 +10152,7 @@ static int wsgi_start_process(apr_pool_t *p, WSGIDaemonProcess *daemon) if (daemon->group->cpu_time_limit > 0) { struct rlimit limit; int result = -1; + errno = ENOSYS; limit.rlim_cur = daemon->group->cpu_time_limit; @@ -10163,7 +10164,7 @@ static int wsgi_start_process(apr_pool_t *p, WSGIDaemonProcess *daemon) #endif if (result == -1) { - ap_log_error(APLOG_MARK, APLOG_CRIT, 0, wsgi_server, + ap_log_error(APLOG_MARK, APLOG_CRIT, errno, wsgi_server, "mod_wsgi (pid=%d): Couldn't set CPU time " "limit of %d seconds for process '%s'.", getpid(), daemon->group->cpu_time_limit, @@ -10180,6 +10181,7 @@ static int wsgi_start_process(apr_pool_t *p, WSGIDaemonProcess *daemon) if (daemon->group->memory_limit > 0) { struct rlimit limit; int result = -1; + errno = ENOSYS; limit.rlim_cur = daemon->group->memory_limit; @@ -10190,7 +10192,7 @@ static int wsgi_start_process(apr_pool_t *p, WSGIDaemonProcess *daemon) #endif if (result == -1) { - ap_log_error(APLOG_MARK, APLOG_CRIT, 0, wsgi_server, + ap_log_error(APLOG_MARK, APLOG_CRIT, errno, wsgi_server, "mod_wsgi (pid=%d): Couldn't set memory " "limit of %ld for process '%s'.", getpid(), (long)daemon->group->memory_limit, @@ -10207,6 +10209,7 @@ static int wsgi_start_process(apr_pool_t *p, WSGIDaemonProcess *daemon) if (daemon->group->virtual_memory_limit > 0) { struct rlimit limit; int result = -1; + errno = ENOSYS; limit.rlim_cur = daemon->group->virtual_memory_limit; @@ -10219,7 +10222,7 @@ static int wsgi_start_process(apr_pool_t *p, WSGIDaemonProcess *daemon) #endif if (result == -1) { - ap_log_error(APLOG_MARK, APLOG_CRIT, 0, wsgi_server, + ap_log_error(APLOG_MARK, APLOG_CRIT, errno, wsgi_server, "mod_wsgi (pid=%d): Couldn't set virtual memory " "limit of %ld for process '%s'.", getpid(), (long)daemon->group->virtual_memory_limit, |