about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2006-09-15 21:22:06 +0000
committerClint Adams <clint@users.sourceforge.net>2006-09-15 21:22:06 +0000
commit7a7dfd55a1eb8682ec0b559476107cd4c168de95 (patch)
tree9e4b72eb27ac4d3269dbd868f47e65c55665a528 /Src
parent572ad667e7c868dbcb2c609cd7d421c3359589b9 (diff)
downloadzsh-7a7dfd55a1eb8682ec0b559476107cd4c168de95.tar.gz
zsh-7a7dfd55a1eb8682ec0b559476107cd4c168de95.tar.xz
zsh-7a7dfd55a1eb8682ec0b559476107cd4c168de95.zip
22718: use ulimit -e and -r for RLIMIT_NICE and RLIMIT_RTPRIO respectively.
Diffstat (limited to 'Src')
-rw-r--r--Src/Builtins/rlimits.c22
1 files changed, 22 insertions, 0 deletions
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);
@@ -773,6 +785,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", *options);