bin/183494: [PATCH] usr.bin/limits: cannot set kqueues limit
Stefan Neudorf
BM-2cXppXU4T67w7j6NCir9T1WdzBHmFgBnLj at bitmessage.ch
Wed Oct 30 19:20:01 UTC 2013
>Number: 183494
>Category: bin
>Synopsis: [PATCH] usr.bin/limits: cannot set kqueues limit
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Oct 30 19:20:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Stefan Neudorf
>Release:
>Organization:
>Environment:
>Description:
r256850 added kqueues limit but failed to update getopt() call leading
to -k option (similar to sh's ulimit -k) not being recognized.
>How-To-Repeat:
$ limits -k 5
usage: limits [-C class|-P pid|-U user] [-eaSHBE] [-bcdflmnstuvpw [val]] [[name=val ...] cmd]
>Fix:
--- kqueues_limit.diff begins here ---
Index: usr.bin/limits/limits.c
===================================================================
--- usr.bin/limits/limits.c (revision 257346)
+++ usr.bin/limits/limits.c (working copy)
@@ -248,7 +249,7 @@ static struct {
* to be modified accordingly!
*/
-#define RCS_STRING "tfdscmlunbvpw"
+#define RCS_STRING "tfdscmlunbvpwk"
static rlim_t resource_num(int which, int ch, const char *str);
static void usage(void);
@@ -287,7 +288,7 @@ main(int argc, char *argv[])
pid = -1;
optarg = NULL;
- while ((ch = getopt(argc, argv, ":EeC:U:BSHP:ab:c:d:f:l:m:n:s:t:u:v:p:w:")) != -1) {
+ while ((ch = getopt(argc, argv, ":EeC:U:BSHP:ab:c:d:f:l:m:n:s:t:u:v:p:w:k:")) != -1) {
switch(ch) {
case 'a':
doall = 1;
@@ -544,7 +545,7 @@ usage(void)
{
(void)fprintf(stderr,
"usage: limits [-C class|-P pid|-U user] [-eaSHBE] "
- "[-bcdflmnstuvpw [val]] [[name=val ...] cmd]\n");
+ "[-bcdflmnstuvpwk [val]] [[name=val ...] cmd]\n");
exit(EXIT_FAILURE);
}
--- kqueues_limit.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list