From nobody Sat Oct 05 07:11:11 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XLGmJ0sW9z5XrZL; Sat, 05 Oct 2024 07:11:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XLGmH3jRzz4N79; Sat, 5 Oct 2024 07:11:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=efF7fKsnrHKtwCAWtdGO0Sv0pKpmgyoYgKEBP0HnnTY=; b=LhnmMUNuTJQO8iCsPHJS51NS8/Reuh6SYAFmr9J8ZjhWhYwGqf2ZYL5uzWFketjXs/iK66 TfDrv8kGep1+8ScFiKPbHn3EthJGdHpZtFYyamYJfzp20Tp7LXc+ZJcoBVwEbGa0qJxP6b 3zeOXZZ9mxI5ObrLeebMvQfrcbHxLmn8/4xbJT6AHVi06xtKMgQ3SsbhQoOxovahBTi8Dz swGmwnn1Qfnv8QkSE4NE+P0p7tbD7taQeCubyQ6eymFBRXeXCfzmkuBsF7j8vTAopJxl09 krNoz6WGpvM4UGyAs8VwKObVTHVn6YAM7N1+UEw/SrzdOzJRcOkUCF17VNf7Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1728112271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=efF7fKsnrHKtwCAWtdGO0Sv0pKpmgyoYgKEBP0HnnTY=; b=kZxscyi/CRZ8fEBYYGmTg1wwknJEodpDOT0Ix9lET8bl0kPg/cD5JqnGAHzheNTdusVpNI Qm+W7OCeCNan3CEDDG0LGT1jwkTaLe8ZOc8wyu15ClxEH6prvAzha3S4NJdJufw1jYQSl6 9r9z60Q/sRXhBJ1aO7hnjSRLh0O1+KCeUp5qVW77W/aRWQvScK9XKcQII9iGHl2HUTBPXV HUAu/7mawd7Wiq35SHAbeFS2J4hpQJKHLQoY/qyKfnJ/yeF0RjOs/o25MFpxed8KWNMu6K rZzu4J0dDArWxY9CPGFQ8qXjqemAUQGSzgHNnirPNUlk5+Ot5YHZkmZAdaU6kQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1728112271; a=rsa-sha256; cv=none; b=yxpD3Xhxkfb+PZaOHPASC3j2IqQwryEdP2xNtV1+dSYPf2djaem3kVwNOFFTjvWoRroJYC vQXG/nLzypt/i9H2erUaQegUGE76lY15hApbELYdhzGlMFZua3K/OWvHtqAoVHOtGwhknG vceo2hqcmWN8MXNKC0Y7SvmP4iV83vHZ5h7aphwrnoo8QNJNegYJR1ojhLomqDgBCcAloS tf2FO4IlK1aJJoCMg1N74MY/5uy5vEkmnG9duvhOkJSETHJA5d8pF24KITVTSDpX5ZkfF4 dSWsNVXBHDf9F/qKq8tXUFADToOMNGysJB7x8b7oAAqfx1yT96Ewh8nDR3ccLg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XLGmH3FQCz17j5; Sat, 5 Oct 2024 07:11:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4957BBfJ000920; Sat, 5 Oct 2024 07:11:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4957BBJQ000917; Sat, 5 Oct 2024 07:11:11 GMT (envelope-from git) Date: Sat, 5 Oct 2024 07:11:11 GMT Message-Id: <202410050711.4957BBJQ000917@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 25902860b270 - stable/14 - usr.bin/limits: support RLIMIT_PIPEBUF List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 25902860b2707ab840543eadb3d4e6bcdd8fee01 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=25902860b2707ab840543eadb3d4e6bcdd8fee01 commit 25902860b2707ab840543eadb3d4e6bcdd8fee01 Author: Konstantin Belousov AuthorDate: 2024-09-10 04:13:46 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-05 07:08:54 +0000 usr.bin/limits: support RLIMIT_PIPEBUF (cherry picked from commit f54f41403d149e867b896ae753a0e7e2b0c738b0) --- usr.bin/limits/limits.1 | 6 +++++- usr.bin/limits/limits.c | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/usr.bin/limits/limits.1 b/usr.bin/limits/limits.1 index 86df08b41058..0e374acd991b 100644 --- a/usr.bin/limits/limits.1 +++ b/usr.bin/limits/limits.1 @@ -32,7 +32,7 @@ .Nm .Op Fl C Ar class | Fl U Ar user .Op Fl SHB -.Op Fl bcdfklmnopstuvw Op Ar val +.Op Fl bcdfklmnopstuvwy Op Ar val .Op Fl E .Oo .Op Ar name Ns = Ns Ar value ... @@ -280,6 +280,10 @@ space. Select or set the .Va swapuse resource limit. +.It Fl y Op Ar val +Select or set the +.Va pipebuf +resource limit. .El .Pp Valid values for diff --git a/usr.bin/limits/limits.c b/usr.bin/limits/limits.c index 68b1853651b9..c53066b52a9f 100644 --- a/usr.bin/limits/limits.c +++ b/usr.bin/limits/limits.c @@ -91,6 +91,7 @@ static struct { { " swapuse%-4s %8s", " kB\n", 1024 }, { " kqueues%-4s %8s", "\n", 1 }, { " umtxp%-4s %8s", "\n", 1 }, + { " pipebuf%-4s %8s", " kB\n", 1024 }, } }, { "sh", "unlimited", "", " -H", " -S", "", @@ -110,6 +111,7 @@ static struct { { "ulimit%s -w %s", ";\n", 1024 }, { "ulimit%s -k %s", ";\n", 1 }, { "ulimit%s -o %s", ";\n", 1 }, + { "ulimit%s -y %s", ";\n", 1024 }, } }, { "csh", "unlimited", "", " -h", "", NULL, @@ -242,6 +244,7 @@ static struct { { "swapuse", login_getcapsize }, { "kqueues", login_getcapnum }, { "umtxp", login_getcapnum }, + { "pipebuf", login_getcapnum }, }; /* @@ -252,7 +255,7 @@ static struct { * to be modified accordingly! */ -#define RCS_STRING "tfdscmlunbvpwko" +#define RCS_STRING "tfdscmlunbvpwkoy" static rlim_t resource_num(int which, int ch, const char *str); static void usage(void) __dead2; @@ -292,7 +295,7 @@ main(int argc, char *argv[]) pid = -1; optarg = NULL; while ((ch = getopt(argc, argv, - ":EeC:U:BSHP:ab:c:d:f:l:m:n:s:t:u:v:p:w:k:o:")) != -1) { + ":EeC:U:BSHP:ab:c:d:f:l:m:n:s:t:u:v:p:w:k:o:y:")) != -1) { switch(ch) { case 'a': doall = 1; @@ -623,6 +626,7 @@ resource_num(int which, int ch, const char *str) case RLIMIT_SBSIZE: case RLIMIT_VMEM: case RLIMIT_SWAP: + case RLIMIT_PIPEBUF: errno = 0; res = 0; while (*s) {