From 7a7dfd55a1eb8682ec0b559476107cd4c168de95 Mon Sep 17 00:00:00 2001 From: Clint Adams Date: Fri, 15 Sep 2006 21:22:06 +0000 Subject: 22718: use ulimit -e and -r for RLIMIT_NICE and RLIMIT_RTPRIO respectively. --- ChangeLog | 5 +++++ Src/Builtins/rlimits.c | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/ChangeLog b/ChangeLog index 8d947b045..d63c2912d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-09-15 Clint Adams + + * 22718: Src/Builtins/rlimits.c: use ulimit -e and -r + for RLIMIT_NICE and RLIMIT_RTPRIO respectively. + 2006-09-15 Peter Stephenson * 22715: Src/exec.c: AUTOCONTINUE option never worked. diff --git a/Src/Builtins/rlimits.c b/Src/Builtins/rlimits.c index e7df978a9..4e512014b 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); @@ -772,6 +784,16 @@ bin_ulimit(char *name, char **argv, UNUSED(Options ops), UNUSED(int func)) case 'q': 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 */ -- cgit 1.4.1