aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2024-09-10 04:12:27 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2024-09-20 06:46:07 +0000
commit5d92f20c7d316aca521d4db4c1dab0f2d0e92c36 (patch)
tree0850395cf4f9feda2232b7b3c3d83ae326b2c44a
parenta4c04958f526a0dba353b54641dc5d2806984d02 (diff)
bin/sh: support RLIMIT_PIPEBUF
Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D46619
-rw-r--r--bin/sh/miscbltin.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/sh/miscbltin.c b/bin/sh/miscbltin.c
index 6364bd10a584..9d0280bb548a 100644
--- a/bin/sh/miscbltin.c
+++ b/bin/sh/miscbltin.c
@@ -484,6 +484,9 @@ static const struct limits limits[] = {
#ifdef RLIMIT_UMTXP
{ "umtx shared locks", (char *)0, RLIMIT_UMTXP, 1, 'o' },
#endif
+#ifdef RLIMIT_PIPEBUF
+ { "pipebuf", (char *)0, RLIMIT_PIPEBUF, 1024, 'y' },
+#endif
{ (char *) 0, (char *)0, 0, 0, '\0' }
};
@@ -519,7 +522,7 @@ ulimitcmd(int argc __unused, char **argv __unused)
struct rlimit limit;
what = 'f';
- while ((optc = nextopt("HSatfdsmcnuvlbpwko")) != '\0')
+ while ((optc = nextopt("HSatfdsmcnuvlbpwkoy")) != '\0')
switch (optc) {
case 'H':
how = HARD;