]> git.wh0rd.org - patches.git/blame - bash-3.1-ulimit.patch
more random patches. who knows.
[patches.git] / bash-3.1-ulimit.patch
CommitLineData
b53d1f41
MF
1Ripped from Fedora
2
3Add support for RLIMIT_NICE/RLIMIT_RTPRIO and add missing documentation
4for many other options
5
6--- builtins/ulimit.def
7+++ builtins/ulimit.def
8@@ -34,18 +34,20 @@
9 -a all current limits are reported
10 -c the maximum size of core files created
11 -d the maximum size of a process's data segment
12+ -e the maximum scheduling priority (`nice')
13 -f the maximum size of files created by the shell
14- -i the maximum number of pending signals
15+ -i the maximum number of pending signals
16 -l the maximum size a process may lock into memory
17 -m the maximum resident set size
18 -n the maximum number of open file descriptors
19 -p the pipe buffer size
20- -q the maximum number of bytes in POSIX message queues
21+ -q the maximum number of bytes in POSIX message queues
22+ -r the maximum rt priority
23 -s the maximum stack size
24 -t the maximum amount of cpu time in seconds
25 -u the maximum number of user processes
26 -v the size of virtual memory
27- -x the maximum number of file locks
28+ -x the maximum number of file locks
29
30 If LIMIT is given, it is the new value of the specified resource;
31 the special LIMIT values `soft', `hard', and `unlimited' stand for
32@@ -202,6 +204,9 @@
33 #ifdef RLIMIT_DATA
34 { 'd', RLIMIT_DATA, 1024, "data seg size", "kbytes" },
35 #endif
36+#ifdef RLIMIT_NICE
37+ { 'e', RLIMIT_NICE, 1, "max nice", (char *)NULL},
38+#endif
39 { 'f', RLIMIT_FILESIZE, 1024, "file size", "blocks" },
40 #ifdef RLIMIT_SIGPENDING
41 { 'i', RLIMIT_SIGPENDING, 1, "pending signals", (char *)NULL },
42@@ -217,6 +222,9 @@
43 #ifdef RLIMIT_MSGQUEUE
44 { 'q', RLIMIT_MSGQUEUE, 1, "POSIX message queues", "bytes" },
45 #endif
46+#ifdef RLIMIT_RTPRIO
47+ { 'r', RLIMIT_RTPRIO, 1, "max rt priority", (char *)NULL},
48+#endif
49 #ifdef RLIMIT_STACK
50 { 's', RLIMIT_STACK, 1024, "stack size", "kbytes" },
51 #endif
52--- doc/bashref.texi
53+++ doc/bashref.texi
54@@ -3833,7 +3833,7 @@
55 @item ulimit
56 @btindex ulimit
57 @example
58-ulimit [-acdflmnpstuvSH] [@var{limit}]
59+ulimit [-acdefilmnpqrstuvxSH] [@var{limit}]
60 @end example
61 @code{ulimit} provides control over the resources available to processes
62 started by the shell, on systems that allow such control. If an
63@@ -3854,9 +3854,15 @@
64 @item -d
65 The maximum size of a process's data segment.
66
67+@item -e
68+The maximum scheduling priority.
69+
70 @item -f
71 The maximum size of files created by the shell.
72
73+@item -i
74+The maximum number of pending signals.
75+
76 @item -l
77 The maximum size that may be locked into memory.
78
79@@ -3869,6 +3875,12 @@
80 @item -p
81 The pipe buffer size.
82
83+@item -q
84+The maximum number of bytes in POSIX message queues.
85+
86+@item -r
87+The maximum RT priority.
88+
89 @item -s
90 The maximum stack size.
91
92@@ -3881,6 +3893,9 @@
93 @item -v
94 The maximum amount of virtual memory available to the process.
95
96+@item -x
97+The maximum amount of file locks.
98+
99 @end table
100
101 If @var{limit} is given, it is the new value of the specified resource;
102--- doc/bash.1
103+++ doc/bash.1
104@@ -8484,7 +8484,7 @@
105 returns true if any of the arguments are found, false if
106 none are found.
107 .TP
108-\fBulimit\fP [\fB\-SHacdflmnpstuv\fP [\fIlimit\fP]]
109+\fBulimit\fP [\fB\-SHacdefilmnpqrstuvx\fP [\fIlimit\fP]]
110 Provides control over the resources available to the shell and to
111 processes started by it, on systems that allow such control.
112 The \fB\-H\fP and \fB\-S\fP options specify that the hard or soft limit is
113@@ -8520,9 +8520,15 @@
114 .B \-d
115 The maximum size of a process's data segment
116 .TP
117+.B \-e
118+The maximum scheduling priority (`nice')
119+.TP
120 .B \-f
121 The maximum size of files created by the shell
122 .TP
123+.B \-i
124+The maximum number of pending signals
125+.TP
126 .B \-l
127 The maximum size that may be locked into memory
128 .TP
129@@ -8536,6 +8542,12 @@
130 .B \-p
131 The pipe size in 512-byte blocks (this may not be set)
132 .TP
133+.B \-q
134+The maximum number of bytes in POSIX message queues
135+.TP
136+.B \-r
137+The maximum rt priority
138+.TP
139 .B \-s
140 The maximum stack size
141 .TP
142@@ -8547,6 +8559,9 @@
143 .TP
144 .B \-v
145 The maximum amount of virtual memory available to the shell
146+.TP
147+.B \-x
148+The maximum number of file locks
149 .PD
150 .PP
151 If