1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
$NetBSD: patch-ag,v 1.8 2002/04/11 15:26:21 abs Exp $
--- sh.func.c.orig Tue Mar 13 12:53:50 2001
+++ sh.func.c
@@ -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);
|