aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSami Kerola <kerolasa@iki.fi>2015-02-22 14:41:34 +0000
committerKarel Zak <kzak@redhat.com>2015-02-24 11:22:26 +0100
commit288cb6f5dd72e4f4fe7dfb45015eaca6d7317995 (patch)
tree66cc8d5346b1211531d15e86e5f2a6589f45d7c1
parentaf17d349fcbb6f42dcac66d13c44e8697410e6de (diff)
downloadutil-linux-playground-288cb6f5dd72e4f4fe7dfb45015eaca6d7317995.tar.gz
prlimit: tell in --verbose output which pid got the new limit
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
-rw-r--r--sys-utils/prlimit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys-utils/prlimit.c b/sys-utils/prlimit.c
index ddab76e230..0fa5d57995 100644
--- a/sys-utils/prlimit.c
+++ b/sys-utils/prlimit.c
@@ -360,7 +360,8 @@ static void do_prlimit(struct list_head *lims)
old = &lim->rlim;
if (verbose && new) {
- printf(_("New %s limit: "), lim->desc->name);
+ printf(_("New %s limit for pid %d: "), lim->desc->name,
+ pid ? pid : getpid());
if (new->rlim_cur == RLIM_INFINITY)
printf("<%s", _("unlimited"));
else