Confusion over relationship between busybox and coredumps

Hi all,

My understanding is in order to get a core dump you need to perform the following actions:

  • Enable ELF coredump in the kernel
  • Enable FEATURE_INIT_COREDUMPS in busybox
  • touch /.init_enable_core
  • ulimit -c unlimited
  • Set the kernel core_pattern e.g. sysctl -w "kernel.core_pattern=/tmp/%e.%p.%s.%t.core"

I've got it working now but I'm confused about why enabling init coredump in busybox works. I understand what it is doing (see quote below). But aren't we using procd as init not busybox. So surely the FEATURE_INIT_COREDUMPS code portion will never be run. Can anyone help clear this up for me?

"If this option is enabled and the file /.init_enable_core
exists, then init will call setrlimit() to allow unlimited
core file sizes. If this option is disabled, processes
will not generate any core files."

Thanks in advance,
Don