Re: [PATCH 03/15] prlimit: fix diagnostic when setting current PIDs resources fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
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


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux