Software /
code /
prosody
Comparison
util-src/pposix.c @ 5359:43517e649c53
util.pposix: Allow fetching RLIMIT_NICE when available
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 22 Mar 2013 11:23:40 +0000 |
parent | 5176:7d0a8b255a37 |
child | 5449:35a271b4b920 |
comparison
equal
deleted
inserted
replaced
5358:4d37d792c4d5 | 5359:43517e649c53 |
---|---|
482 #if !(defined(sun) || defined(__sun)) | 482 #if !(defined(sun) || defined(__sun)) |
483 if (!strcmp(s, "MEMLOCK")) return RLIMIT_MEMLOCK; | 483 if (!strcmp(s, "MEMLOCK")) return RLIMIT_MEMLOCK; |
484 if (!strcmp(s, "NPROC")) return RLIMIT_NPROC; | 484 if (!strcmp(s, "NPROC")) return RLIMIT_NPROC; |
485 if (!strcmp(s, "RSS")) return RLIMIT_RSS; | 485 if (!strcmp(s, "RSS")) return RLIMIT_RSS; |
486 #endif | 486 #endif |
487 #ifdef RLIMIT_NICE | |
488 if (!strcmp(s, "NICE")) return RLIMIT_NICE; | |
489 #endif | |
487 return -1; | 490 return -1; |
488 } | 491 } |
489 | 492 |
490 int lc_setrlimit(lua_State *L) { | 493 int lc_setrlimit(lua_State *L) { |
491 int arguments = lua_gettop(L); | 494 int arguments = lua_gettop(L); |