summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1998-11-24 04:32:48 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1998-11-24 04:32:48 +0000
commitacc5972498ad0a43a75d946db1979931bb22d643 (patch)
tree9ac7078e0d91ff52458cab32651dcee3a3e7f160 /bin
parent38a9efdcb6530588d5fcda490ec61ab280852410 (diff)
better error message from ulimit
Diffstat (limited to 'bin')
-rw-r--r--bin/ksh/c_ulimit.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/ksh/c_ulimit.c b/bin/ksh/c_ulimit.c
index 153e68d0f79..0faf8fbfa66 100644
--- a/bin/ksh/c_ulimit.c
+++ b/bin/ksh/c_ulimit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: c_ulimit.c,v 1.5 1998/10/29 04:09:20 millert Exp $ */
+/* $OpenBSD: c_ulimit.c,v 1.6 1998/11/24 04:32:47 millert Exp $ */
/*
ulimit -- handle "ulimit" builtin
@@ -227,7 +227,11 @@ c_ulimit(wp)
if (how & HARD)
limit.rlim_max = val;
if (setrlimit(l->scmd, &limit) < 0) {
- bi_errorf("bad limit: %s", strerror(errno));
+ if (errno == EPERM)
+ bi_errorf("exceeds allowable limit");
+ else
+ bi_errorf("bad limit: %s",
+ strerror(errno));
return 1;
}
} else {