Raise rlimit in loader.

This commit is contained in:
Christian Deacon
2020-05-07 04:32:09 +00:00
parent 4d5eb050bd
commit d2a65ae389

View File

@@ -7,6 +7,7 @@
#include <inttypes.h>
#include <time.h>
#include <getopt.h>
#include <sys/resource.h>
#include <net/if.h>
#include <linux/if_link.h>
@@ -276,6 +277,16 @@ int main(int argc, char *argv[])
return EXIT_SUCCESS;
}
// Raise RLimit.
struct rlimit rl = {RLIM_INFINITY, RLIM_INFINITY};
if (setrlimit(RLIMIT_MEMLOCK, &rl))
{
fprintf(stderr, "Error setting rlimit.\n");
return EXIT_FAILURE;
}
// Check for --config argument.
if (configFile == NULL)
{