aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2013-03-22 11:23:40 +0000
committerMatthew Wild <mwild1@gmail.com>2013-03-22 11:23:40 +0000
commitc35eabfe0ddad47f11bb0c8b396e5a50b4845567 (patch)
treed7e55efcf7628384eb6f212dfbb3e411e7dec421
parent68f6dcb14af830b887daf988d54f6aa847b473a1 (diff)
downloadprosody-c35eabfe0ddad47f11bb0c8b396e5a50b4845567.tar.gz
prosody-c35eabfe0ddad47f11bb0c8b396e5a50b4845567.zip
util.pposix: Allow fetching RLIMIT_NICE when available
-rw-r--r--util-src/pposix.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/util-src/pposix.c b/util-src/pposix.c
index 05303d99..99a308cf 100644
--- a/util-src/pposix.c
+++ b/util-src/pposix.c
@@ -484,6 +484,9 @@ int string2resource(const char *s) {
if (!strcmp(s, "NPROC")) return RLIMIT_NPROC;
if (!strcmp(s, "RSS")) return RLIMIT_RSS;
#endif
+#ifdef RLIMIT_NICE
+ if (!strcmp(s, "NICE")) return RLIMIT_NICE;
+#endif
return -1;
}