From dae1184302834b52cff438fbf5322cd1c9c79c06 Mon Sep 17 00:00:00 2001 From: Bernd Schubert Date: Wed, 10 Jul 2024 23:04:46 +0200 Subject: Add syslog and fatal signal handler feature I see random ENOTCONN failures in xfstest generic/013 and generic/014 in my branch, but earliest on the 2nd run - takes ~12hours to get the issue, but then there are no further information logged. ENOTCONN points to a daemon crash - I need backtraces and a core dump. This adds optional handling of fatal signals to print a core dump and optional syslog logging with these new public functions: fuse_set_fail_signal_handlers() In addition to the existing fuse_set_signal_handlers(). This is not enabled together with fuse_set_signal_handlers(), as it is change in behavior and file systems might already have their own fatal handlers. fuse_log_enable_syslog Print logs to syslog instead of stderr fuse_log_close_syslog Close syslog (for now just does closelog()) Code in fuse_signals.c is also updated, to be an array of signals, and setting signal handlers is now down with a for-loop instead of one hand coded set_one_signal_handler() per signal. --- lib/fuse_versionscript | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/fuse_versionscript') diff --git a/lib/fuse_versionscript b/lib/fuse_versionscript index 1058372..14cbca1 100644 --- a/lib/fuse_versionscript +++ b/lib/fuse_versionscript @@ -198,6 +198,9 @@ FUSE_3.17 { fuse_passthrough_close; fuse_session_custom_io_30; fuse_session_custom_io_317; + fuse_set_fail_signal_handlers; + fuse_log_enable_syslog; + fuse_log_close_syslog; } FUSE_3.12; # Local Variables: -- cgit v1.2.3