check for availability of RLIMIT_NOFILE and RLIMIT_AS before we make use of it

This commit is contained in:
Lennart Poettering 2009-01-27 00:48:53 +01:00
parent 4e31e00b63
commit 3bcbe1d18f
3 changed files with 28 additions and 3 deletions

View file

@ -298,7 +298,9 @@ static void set_all_rlimits(const pa_daemon_conf *conf) {
#ifdef RLIMIT_NPROC
set_one_rlimit(&conf->rlimit_nproc, RLIMIT_NPROC, "RLIMIT_NPROC");
#endif
#ifdef RLIMIT_NOFILE
set_one_rlimit(&conf->rlimit_nofile, RLIMIT_NOFILE, "RLIMIT_NOFILE");
#endif
#ifdef RLIMIT_MEMLOCK
set_one_rlimit(&conf->rlimit_memlock, RLIMIT_MEMLOCK, "RLIMIT_MEMLOCK");
#endif