[PATCH 14/15] prlimit: avoid prlimit syscalls for limits unless to
modify or to show
Signed-off-by: Bernhard Voelker <mail@xxxxxxxxxxxxxxxxxxx>
---
sys-utils/prlimit.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/sys-utils/prlimit.c b/sys-utils/prlimit.c
index 1d6dd92..69440a5 100644
--- a/sys-utils/prlimit.c
+++ b/sys-utils/prlimit.c
@@ -349,6 +349,8 @@ static void do_prlimit(struct prlimit lims[], int
tt_flags)
errx(EXIT_FAILURE, _("the soft limit cannot exceed the ceiling
value"));
new = &lims[i].rlim;
+ } else if (!(lims[i].show)) {
+ continue;
}
if (verbose && new) {
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html