"This functionality should not be used outside of testing environments.");
}
-static void initialize_coredump(bool skip_setup) {
- if (getpid_cached() != 1)
- return;
-
- /* Don't limit the core dump size, so that coredump handlers such as systemd-coredump (which honour
- * the limit) will process core dumps for system services by default. */
- if (setrlimit(RLIMIT_CORE, &RLIMIT_MAKE_CONST(RLIM_INFINITY)) < 0)
- log_warning_errno(errno, "Failed to set RLIMIT_CORE: %m");
-
- /* But at the same time, turn off the core_pattern logic by default, so that no coredumps are stored
- * until the systemd-coredump tool is enabled via sysctl. However it can be changed via the kernel
- * command line later so core dumps can still be generated during early startup and in initrd. */
- if (!skip_setup)
- disable_coredumps();
-}
-
static void initialize_core_pattern(bool skip_setup) {
int r;
kernel_timestamp = DUAL_TIMESTAMP_NULL;
}
- initialize_coredump(skip_setup);
-
r = fixup_environment();
if (r < 0) {
log_emergency_errno(r, "Failed to fix up PID 1 environment: %m");
# the core dump.
#
# See systemd-coredump(8) and core(5).
-kernel.core_pattern=|{{ROOTLIBEXECDIR}}/systemd-coredump %P %u %g %s %t %c %h
+kernel.core_pattern=|{{ROOTLIBEXECDIR}}/systemd-coredump %P %u %g %s %t 9223372036854775808 %h
# Allow 16 coredumps to be dispatched in parallel by the kernel.
# We collect metadata from /proc/%P/, and thus need to make sure the crashed