diff options
author | Paul Ackersviller <packersv@users.sourceforge.net> | 2007-10-29 18:29:24 +0000 |
---|---|---|
committer | Paul Ackersviller <packersv@users.sourceforge.net> | 2007-10-29 18:29:24 +0000 |
commit | a7933c3c755a1e493cab54e9feaeefd80fe2025f (patch) | |
tree | 1835e80e396bbf9d7b32cf862284e48bf62b1ce4 /Src | |
parent | 1812cf10492e0dbfc9fe6e696bee0d5f2142af63 (diff) | |
download | zsh-a7933c3c755a1e493cab54e9feaeefd80fe2025f.tar.gz zsh-a7933c3c755a1e493cab54e9feaeefd80fe2025f.tar.xz zsh-a7933c3c755a1e493cab54e9feaeefd80fe2025f.zip |
Merge of 22718 and 22719: use ulimit -e and -r for RLIMIT_NICE and RLIMIT_RTPRIO respectively.
Diffstat (limited to 'Src')
-rw-r--r-- | Src/Builtins/rlimits.c | 22 |
1 files changed, 22 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); |