projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3dc2f14
)
util.pposix: Allow fetching RLIMIT_NICE when available
author
Matthew Wild
<mwild1@gmail.com>
Fri, 22 Mar 2013 11:23:40 +0000
(11:23 +0000)
committer
Matthew Wild
<mwild1@gmail.com>
Fri, 22 Mar 2013 11:23:40 +0000
(11:23 +0000)
util-src/pposix.c
patch
|
blob
|
history
diff --git
a/util-src/pposix.c
b/util-src/pposix.c
index 05303d99ae574a2e1ab990f64d06d206e19fd11a..99a308cfea8f79ac8c626ad2392523cde2ed86d6 100644
(file)
--- a/
util-src/pposix.c
+++ b/
util-src/pposix.c
@@
-483,6
+483,9
@@
int string2resource(const char *s) {
if (!strcmp(s, "MEMLOCK")) return RLIMIT_MEMLOCK;
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;
}