util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: Bernhard Voelker <mail@bernhard-voelker.de>
Cc: util-linux@vger.kernel.org
Subject: Re: [PATCH 03/15] prlimit: fix diagnostic when setting current PIDs resources fails
Date: Wed, 16 Nov 2011 13:41:15 +0100	[thread overview]
Message-ID: <20111116124115.GC7916@nb.net.home> (raw)
In-Reply-To: <4EC07357.1030002@bernhard-voelker.de>

On Mon, Nov 14, 2011 at 02:48:07AM +0100, Bernhard Voelker wrote:
> [PATCH 03/15] prlimit: fix diagnostic when setting current PIDs  
> resources fails

 Not applied, but I have improved the error messages according to your
 5-8 patches.

> -			err(EXIT_FAILURE, _("failed to get resource limits for PID %d"), pid);
> +		if (prlimit(pid, lims[i].desc->resource, new, &lims[i].rlim) == -1) {
> +			if (pid)
> +				err(EXIT_FAILURE, _("failed to get resource limits for PID %d"), pid);
> +			else
> +				err(EXIT_FAILURE, _("failed to get resource limits of the current  
> process"));

 I think we don't have to care about the PID in the error message at
 all. The util works always with one PID only.

    "failed to set the %s resource limit"
 or
    "failed to get the %s resource limit"

 seems enough :-)

   Karel


-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

      reply	other threads:[~2011-11-16 12:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-14  1:48 [PATCH 03/15] prlimit: fix diagnostic when setting current PIDs resources fails Bernhard Voelker
2011-11-16 12:41 ` Karel Zak [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111116124115.GC7916@nb.net.home \
    --to=kzak@redhat.com \
    --cc=mail@bernhard-voelker.de \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).