diff options
-rw-r--r-- | Src/Builtins/rlimits.c | 22 | ||||
-rw-r--r-- | configure.ac | 2 |
2 files changed, 24 insertions, 0 deletions
diff --git a/Src/Builtins/rlimits.c b/Src/Builtins/rlimits.c index 922a182a2..be1c13b3c 100644 --- a/Src/Builtins/rlimits.c +++ b/Src/Builtins/rlimits.c @@ -342,6 +342,18 @@ printulimit(char *nam, int lim, int hard, int head) printf("-N %2d: threads per process ", RLIMIT_PTHREAD); break; # endif /* HAVE_RLIMIT_PTHREAD */ +# ifdef HAVE_RLIMIT_NICE + case RLIMIT_NICE: + if (head) + printf("-e: max nice "); + break; +# endif /* HAVE_RLIMIT_NICE */ +# ifdef HAVE_RLIMIT_RTPRIO + case RLIMIT_RTPRIO + if (head) + printf("-r: max rt priority "); + break; +# endif /* HAVE_RLIMIT_RTPRIO */ default: if (head) printf("-N %2d: ", lim); @@ -776,6 +788,16 @@ bin_ulimit(char *name, char **argv, UNUSED(Options ops), UNUSED(int func)) res = RLIMIT_MSGQUEUE; break; # endif +# ifdef HAVE_RLIMIT_NICE + case 'e': + res = RLIMIT_NICE; + break; +# endif +# ifdef HAVE_RLIMIT_RTPRIO + case 'r': + res = RLIMIT_RTPRIO; + break; +# endif default: /* unrecognised limit */ zwarnnam(name, "bad option: -%c", NULL, *options); diff --git a/configure.ac b/configure.ac index a844cad2f..19bae8f38 100644 --- a/configure.ac +++ b/configure.ac @@ -1450,6 +1450,8 @@ zsh_LIMIT_PRESENT(RLIMIT_TCACHE) zsh_LIMIT_PRESENT(RLIMIT_VMEM) zsh_LIMIT_PRESENT(RLIMIT_SIGPENDING) zsh_LIMIT_PRESENT(RLIMIT_MSGQUEUE) +zsh_LIMIT_PRESENT(RLIMIT_NICE) +zsh_LIMIT_PRESENT(RLIMIT_RTPRIO) AH_TEMPLATE([RLIMIT_VMEM_IS_RSS], [Define to 1 if RLIMIT_VMEM and RLIMIT_RSS both exist and are equal.]) |