Merge "Add persist.zygote.core_dump property for coredumps"
am: a36a69a9e6
Change-Id: I98ad11b45bab5a044bc8021cc6c03f9c7f22ab9f
This commit is contained in:
@@ -273,15 +273,17 @@ static void EnableDebugger() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// We don't want core dumps, though, so set the soft limit on core dump size
|
// Set the core dump size to zero unless wanted (see also coredump_setup in build/envsetup.sh).
|
||||||
// to 0 without changing the hard limit.
|
if (!GetBoolProperty("persist.zygote.core_dump", false)) {
|
||||||
rlimit rl;
|
// Set the soft limit on core dump size to 0 without changing the hard limit.
|
||||||
if (getrlimit(RLIMIT_CORE, &rl) == -1) {
|
rlimit rl;
|
||||||
ALOGE("getrlimit(RLIMIT_CORE) failed");
|
if (getrlimit(RLIMIT_CORE, &rl) == -1) {
|
||||||
} else {
|
ALOGE("getrlimit(RLIMIT_CORE) failed");
|
||||||
rl.rlim_cur = 0;
|
} else {
|
||||||
if (setrlimit(RLIMIT_CORE, &rl) == -1) {
|
rl.rlim_cur = 0;
|
||||||
ALOGE("setrlimit(RLIMIT_CORE) failed");
|
if (setrlimit(RLIMIT_CORE, &rl) == -1) {
|
||||||
|
ALOGE("setrlimit(RLIMIT_CORE) failed");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user