[lkml]   [2018]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2] kernel/signal: Signal-based pre-coredump notification
On Wed, Oct 24, 2018 at 3:30 PM Eric W. Biederman <> wrote:
> Enke Chen <> writes:
> > For simplicity and consistency, this patch provides an implementation
> > for signal-based fault notification prior to the coredump of a child
> > process. A new prctl command, PR_SET_PREDUMP_SIG, is defined that can
> > be used by an application to express its interest and to specify the
> > signal (SIGCHLD or SIGUSR1 or SIGUSR2) for such a notification. A new
> > signal code (si_code), CLD_PREDUMP, is also defined for SIGCHLD.
> >
> > Changes to prctl(2):
> >
> > PR_SET_PREDUMP_SIG (since Linux 4.20.x)
> > Set the child pre-coredump signal of the calling process to
> > arg2 (either SIGUSR1, or SIUSR2, or SIGCHLD, or 0 to clear).
> > This is the signal that the calling process will get prior to
> > the coredump of a child process. This value is cleared across
> > execve(2), or for the child of a fork(2).
> >
> > When SIGCHLD is specified, the signal code will be set to
> > CLD_PREDUMP in such an SIGCHLD signal.
> Ugh. Your test case is even using signalfd. So you don't even want
> this signal to be delivered as a signal.

Just to make sure everyone's on the same page: You're suggesting that
it might make sense to deliver the pre-dump notification via a new
type of file instead (along the lines of signalfd, timerfd, eventfd
and so on)?

 \ /
  Last update: 2018-10-25 15:46    [W:0.180 / U:97.644 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site