aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--doc/info/mds.texinfo6
-rw-r--r--src/mds-base.c16
-rw-r--r--src/mds-base.h9
3 files changed, 31 insertions, 0 deletions
diff --git a/doc/info/mds.texinfo b/doc/info/mds.texinfo
index 8425421..7aa0808 100644
--- a/doc/info/mds.texinfo
+++ b/doc/info/mds.texinfo
@@ -4971,6 +4971,12 @@ signal is specified by the parameter @code{signo}. When
this function is invoked, it should set the variable
@code{terminating} to a non-zero value.
+@item @code{received_info} [(@code{int signo}) @arrow{} @code{void}]
+This function is called when a signal that signals the
+server to dump state information and statistics has been
+received. The exact received signal is specified by the
+parameter @code{signo}.
+
@item @code{fork_cleanup} [(@code{int status}) @arrow{} @code{void}]
This function should be implemented by the actual server
implementation if the server has set
diff --git a/src/mds-base.c b/src/mds-base.c
index 2854bef..b944d08 100644
--- a/src/mds-base.c
+++ b/src/mds-base.c
@@ -367,6 +367,19 @@ void __attribute__((weak)) received_danger(int signo)
/**
+ * This function is called when a signal that
+ * signals that the system to dump state information
+ * and statistics has been received
+ *
+ * @param signo The signal that has been received
+ */
+void __attribute__((weak)) received_info(int signo)
+{
+ (void) signo;
+}
+
+
+/**
* Unmarshal the server's saved state
*
* @return Non-zero on error
@@ -626,6 +639,9 @@ int trap_signals(void)
else
fail_if (xsigaction(SIGDANGER, received_danger) < 0);
+ /* Implement support of SIGINFO. */
+ fail_if (xsigaction(SIGINFO, received_info) < 0);
+
return 0;
fail:
xperror(*argv);
diff --git a/src/mds-base.h b/src/mds-base.h
index fe33a83..50aba78 100644
--- a/src/mds-base.h
+++ b/src/mds-base.h
@@ -238,6 +238,15 @@ void received_terminate(int signo); /* __attribute__((weak)) */
void received_danger(int signo); /* __attribute__((weak)) */
/**
+ * This function is called when a signal that
+ * signals that the system to dump state information
+ * and statistics has been received
+ *
+ * @param signo The signal that has been received
+ */
+void received_info(int signo); /* __attribute__((weak)) */
+
+/**
* This function should be implemented by the actual server implementation
*
* This function will be invoked before `initialise_server` (if not re-exec:ing)