svn commit: r230470 - in head/sys: kern sys

Mikolaj Golub trociny at freebsd.org
Sun Jan 22 20:31:53 UTC 2012


On Sun, 22 Jan 2012 20:25:00 +0000 (UTC) Mikolaj Golub wrote:

 MG> Author: trociny
 MG> Date: Sun Jan 22 20:25:00 2012
 MG> New Revision: 230470
 MG> URL: http://svn.freebsd.org/changeset/base/230470

 MG> Log:
 MG>   Change kern.proc.rlimit sysctl to:
 MG>   
 MG>   - retrive only one, specified limit for a process, not the whole
 MG>     array, as it was previously (the sysctl has been added recently and
 MG>     has not been backported to stable yet, so this change is ok);
 MG>   
 MG>   - allow to set a resource limit for another process.
 MG>   
 MG>   Submitted by:        Andrey Zonov <andrey at zonov.org>
 MG>   Discussed with:        kib
 MG>   Reviewed by:        kib
 MG>   MFC after:        2 weeks

Andrey has also been working on the patch for limits(1), which allows
to view/set limits for another process:

- If '-P <pid>' without the list of limits is specified it returns the
limits for this process.

- If '-P <pid>' with the list of limits is specified it changes these
limits for the process.

- If '-P <pid>' with list of limits is specified but also -a option is
present it outputs all limits for the process updated by the command
line setting. So if one want, for example, to set for a current shell
all limits as they are for a process <pid>, but core dump is disabled,
it could run:

eval `limits -P <pid> -aBec 0`

The latest version of the patch is attached. I am going to commit it
if there are no objections or suggestions.

-- 
Mikolaj Golub

-------------- next part --------------
A non-text attachment was scrubbed...
Name: limits.patch
Type: text/x-patch
Size: 5569 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-all/attachments/20120122/665f8c46/limits.bin


More information about the svn-src-all mailing list