summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorrpaulo <rpaulo@FreeBSD.org>2015-02-09 23:13:50 +0000
committerrpaulo <rpaulo@FreeBSD.org>2015-02-09 23:13:50 +0000
commit7a7642565c11da2eecc09631fa17a25888452248 (patch)
treead0f383ed0673acb9c5943503ce0785116c0ae3b /etc
parent11c01339ff84f9243e2d8aba4cf25e9991b937d4 (diff)
downloadFreeBSD-src-7a7642565c11da2eecc09631fa17a25888452248.zip
FreeBSD-src-7a7642565c11da2eecc09631fa17a25888452248.tar.gz
Notify devd(8) when a process crashed.
This change implements a notification (via devctl) to userland when the kernel produces coredumps after a process has crashed. devd can then run a specific command to produce a human readable crash report. The command is most usually a helper that runs gdb/lldb commands on the file/coredump pair. It's possible to use this functionality for implementing automatic generation of crash reports. devd(8) will be notified of the full path of the binary that crashed and the full path of the coredump file.
Diffstat (limited to 'etc')
-rw-r--r--etc/devd.conf12
1 files changed, 12 insertions, 0 deletions
diff --git a/etc/devd.conf b/etc/devd.conf
index 4120c63..7a033a7 100644
--- a/etc/devd.conf
+++ b/etc/devd.conf
@@ -325,4 +325,16 @@ notify 100 {
action "/usr/sbin/automount -c";
};
+# Handle userland coredumps.
+# This commented out handler makes it possible to run an
+# automated debugging session after the core dump is generated.
+# Replace action with a proper coredump handler, but be aware that
+# it will run with elevated privileges.
+notify 10 {
+ match "system" "kernel";
+ match "subsystem" "signal";
+ match "type" "coredump";
+ action "logger $comm $core";
+};
+
*/
OpenPOWER on IntegriCloud