From a7933c3c755a1e493cab54e9feaeefd80fe2025f Mon Sep 17 00:00:00 2001 From: Paul Ackersviller Date: Mon, 29 Oct 2007 18:29:24 +0000 Subject: Merge of 22718 and 22719: use ulimit -e and -r for RLIMIT_NICE and RLIMIT_RTPRIO respectively. --- Src/Builtins/rlimits.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'Src') 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); @@ -775,6 +787,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