mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-07-27 10:33:08 +00:00
Add rlimit code to allow openais to work with linux kernel 2.6.9 or later
(Logical change 1.99) git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@368 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
parent
4b80d3cfa8
commit
d5d47a4e11
@ -41,6 +41,8 @@
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <sys/sysinfo.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <unistd.h>
|
||||
@ -841,6 +843,11 @@ return;
|
||||
static void aisexec_mlockall (void)
|
||||
{
|
||||
int res;
|
||||
struct rlimit rlimit;
|
||||
|
||||
rlimit.rlim_cur = RLIM_INFINITY;
|
||||
rlimit.rlim_max = RLIM_INFINITY;
|
||||
setrlimit (RLIMIT_MEMLOCK, &rlimit);
|
||||
|
||||
res = mlockall (MCL_CURRENT | MCL_FUTURE);
|
||||
if (res == -1) {
|
||||
|
Loading…
Reference in New Issue
Block a user