aboutsummaryrefslogtreecommitdiffstats
path: root/src/mds-registry/signals.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-08-12 02:29:52 +0200
committerMattias Andrée <maandree@operamail.com>2014-08-12 02:29:52 +0200
commitf3cf22b436f8f3e20a9b2f9256ff7c58aa0afda3 (patch)
tree4acb9a75483d6dbbf9a56d08cadc7273d0cd6156 /src/mds-registry/signals.c
parentthe kernel messes with /proc/*/exe (security precaution?), so we read /proc/self/exec when we start the server (diff)
downloadmds-f3cf22b436f8f3e20a9b2f9256ff7c58aa0afda3.tar.gz
mds-f3cf22b436f8f3e20a9b2f9256ff7c58aa0afda3.tar.bz2
mds-f3cf22b436f8f3e20a9b2f9256ff7c58aa0afda3.tar.xz
misc
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/mds-registry/signals.c')
-rw-r--r--src/mds-registry/signals.c42
1 files changed, 1 insertions, 41 deletions
diff --git a/src/mds-registry/signals.c b/src/mds-registry/signals.c
index 7d1f5b4..954c12b 100644
--- a/src/mds-registry/signals.c
+++ b/src/mds-registry/signals.c
@@ -25,9 +25,7 @@
#include <libmdsserver/linked-list.h>
#include <libmdsserver/macros.h>
-#include <stdio.h>
#include <pthread.h>
-#include <errno.h>
@@ -36,7 +34,7 @@
*
* @param signo The signal
*/
-static void signal_all(int signo)
+void signal_all(int signo)
{
pthread_t current_thread;
ssize_t node;
@@ -56,41 +54,3 @@ static void signal_all(int signo)
);
}
-
-/**
- * This function is called when a signal that
- * signals the server to re-exec has been received
- *
- * When this function is invoked, it should set `reexecing` to a non-zero value
- *
- * @param signo The signal that has been received
- */
-void received_reexec(int signo)
-{
- if (reexecing == 0)
- {
- terminating = reexecing = 1;
- eprint("re-exec signal received.");
- signal_all(signo);
- }
-}
-
-
-/**
- * This function is called when a signal that
- * signals the server to re-exec has been received
- *
- * When this function is invoked, it should set `terminating` to a non-zero value
- *
- * @param signo The signal that has been received
- */
-void received_terminate(int signo)
-{
- if (terminating == 0)
- {
- terminating = 1;
- eprint("terminate signal received.");
- signal_all(signo);
- }
-}
-