Created
November 22, 2012 12:26
-
-
Save ichramm/4130936 to your computer and use it in GitHub Desktop.
set rlimit for core file
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
struct rlimit rl; | |
memset(&rl, 0, sizeof(rl)); | |
rl.rlim_cur = RLIM_INFINITY; | |
rl.rlim_max = RLIM_INFINITY; | |
if (setrlimit(RLIMIT_CORE, &rl)) { | |
fprintf(stderr, "Unable to disable core size resource limit: %s\n", strerror(errno)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This can be simplified using designated initializers, which automatically set unspecified fields to zero: