about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPaul Ackersviller <packersv@users.sourceforge.net>2007-10-29 18:29:24 +0000
committerPaul Ackersviller <packersv@users.sourceforge.net>2007-10-29 18:29:24 +0000
commita7933c3c755a1e493cab54e9feaeefd80fe2025f (patch)
tree1835e80e396bbf9d7b32cf862284e48bf62b1ce4 /Src
parent1812cf10492e0dbfc9fe6e696bee0d5f2142af63 (diff)
downloadzsh-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.c22
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);