Re: [PATCH] coredump: add core_pattern specifier for si_code
From: Emanuele Rocca
Date: Wed Mar 18 2026 - 09:19:16 EST
Hi Christian,
On 2026-03-18 10:45, Christian Brauner wrote:
> Request %F which installs pidfd for the coredumping process into the
> coredump helper then use the pidfd info ioctl in you binary with
> PIDFD_INFO_EXIT | PIDFD_INFO_COREDUMP and you can retrieve the exit
> status including the signal that was sent to the process.
Correct me if I'm wrong, but PIDFD_INFO_COREDUMP seems to be setting
coredump_signal, which is siginfo->si_signo? That information is already
available by using the %s core_pattern specifier anyways.
What I am looking for is si_code instead. Perhaps a field could be added
to struct pidfs_attr and set in fs/pidfs.c similarly to what is currently
done for si_signo?