Skip to content

Instantly share code, notes, and snippets.

@slackpad
Created November 19, 2017 03:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slackpad/5bd1148cd0a5df2f98257fe4910ce047 to your computer and use it in GitHub Desktop.
Save slackpad/5bd1148cd0a5df2f98257fe4910ce047 to your computer and use it in GitHub Desktop.
Increase fd rlimit for pid 18048
#include <stdlib.h>
#include <sys/resource.h>
int main() {
struct rlimit limit;
limit.rlim_cur = 4096;
limit.rlim_max = 4096;
int ret;
ret = prlimit(18048, RLIMIT_NOFILE, &limit, NULL);
return ret;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment