Re: [libvirt] [PATCH 4/8] process: Translate "unlimited" correctly

2017-03-27 Thread Andrea Bolognani
On Fri, 2017-03-24 at 13:47 -0400, Luiz Capitulino wrote: > > @@ -747,7 +747,15 @@ virProcessSetMaxMemLock(pid_t pid, unsigned long long > > bytes) > >  if (bytes == 0) > >  return 0; > >   > > -rlim.rlim_cur = rlim.rlim_max = bytes; > > +/* We use

Re: [libvirt] [PATCH 4/8] process: Translate "unlimited" correctly

2017-03-24 Thread Luiz Capitulino
On Thu, 23 Mar 2017 19:16:43 +0100 Andrea Bolognani wrote: > The value we use internally to represent the lack of a memory > locking limit, VIR_DOMAIN_MEMORY_PARAM_UNLIMITED, doesn't > match the value setrlimit() and prlimit() use for the same > purpose, RLIM_INFINITY, so we

[libvirt] [PATCH 4/8] process: Translate "unlimited" correctly

2017-03-23 Thread Andrea Bolognani
The value we use internally to represent the lack of a memory locking limit, VIR_DOMAIN_MEMORY_PARAM_UNLIMITED, doesn't match the value setrlimit() and prlimit() use for the same purpose, RLIM_INFINITY, so we have to handle the translation ourselves. --- src/util/virprocess.c | 20