Re: [PATCH v2] sysctl: Add panic-fatal-signals

From: Vincent Whitchurch
Date: Wed Jan 30 2019 - 11:29:48 EST


On Wed, Jan 30, 2019 at 04:02:36PM +0100, Richard Weinberger wrote:
> Hmm, why can't this be a core dump helper?
> Such as:
>
> #!/bin/sh
> # Usage:
> # echo "|/root/crash.sh %p %e %s" > /proc/sys/kernel/core_pattern
>
> PID="$1"
> COMM="$2"
> SIGNAL="$3"
>
> echo "$COMM ($PID) died by signal $SIGNAL, killing kernel" > /dev/kmsg
> echo c > /proc/sysrq-trigger

Yes, that looks like it should work. Thanks.