]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
prlimit: tell in --verbose output which pid got the new limit
authorSami Kerola <kerolasa@iki.fi>
Sun, 22 Feb 2015 14:41:34 +0000 (14:41 +0000)
committerKarel Zak <kzak@redhat.com>
Tue, 24 Feb 2015 10:22:26 +0000 (11:22 +0100)
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
sys-utils/prlimit.c

index ddab76e23025c7aeb1617804aaec95818fff174e..0fa5d57995aa590eefa828dc342be87a70e0ee88 100644 (file)
@@ -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