Created
November 19, 2017 03:50
-
-
Save slackpad/5bd1148cd0a5df2f98257fe4910ce047 to your computer and use it in GitHub Desktop.
Increase fd rlimit for pid 18048
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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