[core] modify use of getrlimit() to not be fatal
modify use of getrlimit() to not be fatal if an error occurs Some container configurations might cause getrlimit() and setrlimit() to fail. lighttpd will issue error trace if this occurs, but will now proceed. x-ref: "aarch64: Use architecture specific header to general syscalls" https://github.com/seccomp/libseccomp/pull/235 "Rasperry Docker PiHole / "Starting lighttpd" Hanging" https://github.com/pi-hole/docker-pi-hole/issues/593 "Pi-hole runs on podman" https://discourse.pi-hole.net/t/pi-hole-runs-on-podman/34719/5
This commit is contained in:
parent
3f1a12e5fb
commit
d71c1d47ce
|
@ -1237,7 +1237,7 @@ static int server_main_setup (server * const srv, int argc, char **argv) {
|
|||
|
||||
{
|
||||
#ifdef HAVE_GETRLIMIT
|
||||
struct rlimit rlim;
|
||||
struct rlimit rlim = { 4096, 4096 };
|
||||
int use_rlimit = 1;
|
||||
#ifdef HAVE_VALGRIND_VALGRIND_H
|
||||
if (RUNNING_ON_VALGRIND) use_rlimit = 0;
|
||||
|
@ -1245,7 +1245,7 @@ static int server_main_setup (server * const srv, int argc, char **argv) {
|
|||
|
||||
if (0 != getrlimit(RLIMIT_NOFILE, &rlim)) {
|
||||
log_perror(srv->errh, __FILE__, __LINE__, "getrlimit()");
|
||||
return -1;
|
||||
use_rlimit = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue