aboutsummaryrefslogtreecommitdiffstats
path: root/src/mds-server.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/mds-server.c24
1 files changed, 7 insertions, 17 deletions
diff --git a/src/mds-server.c b/src/mds-server.c
index d3ef424..e0ef547 100644
--- a/src/mds-server.c
+++ b/src/mds-server.c
@@ -268,23 +268,13 @@ int main(int argc_, char** argv_)
/* Make the server update without all slaves dying on SIGUSR1. */
- {
- struct sigaction action;
- sigset_t sigset;
-
- sigemptyset(&sigset);
- action.sa_handler = sigusr1_trap;
- action.sa_mask = sigset;
- action.sa_flags = 0;
-
- if (sigaction(SIGUSR1, &action, NULL) < 0)
- {
- perror(*argv);
- fd_table_destroy(&client_map, NULL, NULL);
- linked_list_destroy(&client_list);
- return 1;
- }
- }
+ if (xsigaction(SIGUSR1, sigusr1_trap) < 0)
+ {
+ perror(*argv);
+ fd_table_destroy(&client_map, NULL, NULL);
+ linked_list_destroy(&client_list);
+ return 1;
+ }
/* Create mutex and condition for slave counter. */