[libvirt] [PATCH 1/4] util: new virCommandSetMax(MemLock|Processes|Files)

Daniel P. Berrange berrange at redhat.com
Fri Apr 26 08:46:54 UTC 2013


On Thu, Apr 25, 2013 at 09:44:30PM -0400, Laine Stump wrote:
> This patch adds two sets of functions:
> 
> 1) lower level virProcessSet*() functions that will immediately set
> the RLIMIT_MEMLOCK. RLIMIT_NPROC, or RLIMIT_NOFILE of either the
> current process (using setrlimit()) or any other process (using
> prlimit()). "current process" is indicated by passing a 0 for pid.
> 
> 2) functions for virCommand* that will setup a virCommand object to
> set those limits at a later time just after it has forked a new
> process, but before it execs the new program.
> 
> configure.ac has prlimit and setrlimit added to the list of functions
> to check for, and the low level functions log an "unsupported" error)
> on platforms that don't support those functions.
> ---
>  configure.ac             |   2 +-
>  src/libvirt_private.syms |   6 ++
>  src/util/vircommand.c    |  38 ++++++++++++
>  src/util/vircommand.h    |   4 ++
>  src/util/virprocess.c    | 152 ++++++++++++++++++++++++++++++++++++++++++++++-
>  src/util/virprocess.h    |   5 +-
>  6 files changed, 204 insertions(+), 3 deletions(-)

ACK


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list