bin/183480: [PATCH] usr.bin/limits: wrong limit name for csh/tcsh

Stefan Neudorf BM-2cXppXU4T67w7j6NCir9T1WdzBHmFgBnLj at bitmessage.ch
Wed Oct 30 13:40:01 UTC 2013


>Number:         183480
>Category:       bin
>Synopsis:       [PATCH] usr.bin/limits: wrong limit name for csh/tcsh
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 30 13:40:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Stefan Neudorf
>Release:        
>Organization:
>Environment:
>Description:
r194767 added swaplimit to in-tree tcsh.
r195609 renamed swaplimit to swapsize.

swapuse never existed in tcsh, so eval `limit -e` usage in scripts would
never set the limit.
>How-To-Repeat:
 > limit swapuse 5
 limit: No such limit.
 > limits -e -w 5k
 limit -h swapuse 5;
 limit swapuse 5;
>Fix:
--- swapsize_csh_limit.diff begins here ---
Index: usr.bin/limits/limits.c
===================================================================
--- usr.bin/limits/limits.c	(revision 257346)
+++ usr.bin/limits/limits.c	(working copy)
@@ -125,7 +125,7 @@ static struct {
 	  { "limit%s sbsize %s",          ";\n",  1    },
 	  { "limit%s vmemoryuse %s",      ";\n",  1024 },
 	  { "limit%s pseudoterminals %s", ";\n",  1    },
-	  { "limit%s swapuse %s",         ";\n",  1024 },
+	  { "limit%s swapsize %s",        ";\n",  1024 },
 	  { "limit%s kqueues %s",         ";\n",  1    },
       }
     },
@@ -160,7 +160,7 @@ static struct {
 	  { "limit%s sbsize %s",          ";\n",  1    },
 	  { "limit%s vmemoryuse %s",      ";\n",  1024 },
 	  { "limit%s pseudoterminals %s", ";\n",  1    },
-	  { "limit%s swapuse %s",         ";\n",  1024 },
+	  { "limit%s swapsize %s",        ";\n",  1024 },
 	  { "limit%s kqueues %s",         ";\n",  1    },
       }
     },
--- swapsize_csh_limit.diff ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list