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
commita2a4f805cd1882fee2d736094550325a9f72119b (patch)
treed7e55efcf7628384eb6f212dfbb3e411e7dec421
parentbf3eb41b5585e259aab85be16f999bb9a3074d59 (diff)
downloadprosody-a2a4f805cd1882fee2d736094550325a9f72119b.tar.gz
prosody-a2a4f805cd1882fee2d736094550325a9f72119b.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;
}