MCPcopy Create free account
hub / github.com/caozhiyi/CppNet / SetCoreFileUnlimit

Method SetCoreFileUnlimit

net/linux/LinuxFunc.cpp:27–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27void cppnet::SetCoreFileUnlimit() {
28 struct rlimit rlim;
29 struct rlimit rlim_new;
30 if (getrlimit(RLIMIT_CORE, &rlim) == 0) {
31 rlim_new.rlim_cur = rlim_new.rlim_max = RLIM_INFINITY;
32 if (setrlimit(RLIMIT_CORE, &rlim_new) != 0) {
33 rlim_new.rlim_cur = rlim_new.rlim_max = rlim.rlim_max;
34 setrlimit(RLIMIT_CORE, &rlim_new);
35 }
36 }
37}
38#endif

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected