summaryrefslogtreecommitdiff
path: root/shells/tcsh/patches
diff options
context:
space:
mode:
authortron <tron>2001-12-17 19:26:24 +0000
committertron <tron>2001-12-17 19:26:24 +0000
commitc0ae6523b9856de4bdd0d199ddc580e1693d2986 (patch)
tree768336964bf489dd76773a5c95a493808b0509ee /shells/tcsh/patches
parent55eca2c89ebd0b59a18d033111028898b7687a90 (diff)
downloadpkgsrc-c0ae6523b9856de4bdd0d199ddc580e1693d2986.tar.gz
Add fix for problems reported in PR kern/14968. The patch was provided
by Christos Zoulas in private e-mail.
Diffstat (limited to 'shells/tcsh/patches')
-rw-r--r--shells/tcsh/patches/patch-aa29
1 files changed, 29 insertions, 0 deletions
diff --git a/shells/tcsh/patches/patch-aa b/shells/tcsh/patches/patch-aa
new file mode 100644
index 00000000000..1916c531586
--- /dev/null
+++ b/shells/tcsh/patches/patch-aa
@@ -0,0 +1,29 @@
+$NetBSD: patch-aa,v 1.6 2001/12/17 19:26:25 tron Exp $
+
+--- sh.func.c.orig Tue Mar 13 13:53:50 2001
++++ sh.func.c Mon Dec 17 20:23:03 2001
+@@ -2143,6 +2143,9 @@
+ else
+ rlim.rlim_cur = limit;
+
++ if (rlim.rlim_cur > rlim.rlim_max)
++ rlim.rlim_max = rlim.rlim_cur;
++
+ if (setrlimit(lp->limconst, &rlim) < 0) {
+ # else /* BSDLIMIT */
+ if (limit != RLIM_INFINITY && lp->limconst == RLIMIT_FSIZE)
+@@ -2153,10 +2156,10 @@
+ # endif /* aiws */
+ if (ulimit(toset(lp->limconst), limit) < 0) {
+ # endif /* BSDLIMIT */
+- xprintf(CGETS(15, 1, "%s: %s: Can't %s%s limit\n"), bname, lp->limname,
+- limit == RLIM_INFINITY ? CGETS(15, 2, "remove") :
+- CGETS(15, 3, "set"),
+- hard ? CGETS(14, 4, " hard") : "");
++ xprintf(CGETS(15, 1, "%s: %s: Can't %s%s limit (%s)\n"), bname,
++ lp->limname, limit == RLIM_INFINITY ? CGETS(15, 2, "remove") :
++ CGETS(15, 3, "set"), hard ? CGETS(14, 4, " hard") : "",
++ strerror(errno));
+ return (-1);
+ }
+ return (0);