From dc9887834f0ca7d5e369096ceaa7aeb75ff308f7 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 6 May 2014 16:37:52 +0200 Subject: add xsigaction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/mds.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/mds.c') diff --git a/src/mds.c b/src/mds.c index 6a8b3f8..88fe598 100644 --- a/src/mds.c +++ b/src/mds.c @@ -19,6 +19,7 @@ #include #include +#include #include #include @@ -107,6 +108,10 @@ int main(int argc_, char** argv_) return 1; } + /* Set up to ignore SIGUSR1, used in mds for re-exec, but we cannot re-exec. */ + if (xsigaction(SIGUSR1, SIG_IGN) < 0) + perror(*argv); + /* Create directory for socket files, PID files and such. */ if (create_directory_root(MDS_RUNTIME_ROOT_DIRECTORY)) return 1; @@ -227,8 +232,8 @@ int main(int argc_, char** argv_) /* Start master server and respawn it if it crashes. */ rc = spawn_and_respawn_server(fd); - - done: + + done: /* Shutdown, close and remove the socket. */ if (fd != -1) { -- cgit v1.2.3-70-g09d2