Signed-off-by: Jan Friesse <[email protected]>
---
exec/main.c | 24 +++++++++++++++---------
1 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/exec/main.c b/exec/main.c
index be9e118..1c4fb37 100644
--- a/exec/main.c
+++ b/exec/main.c
@@ -184,6 +184,8 @@ static int32_t corosync_not_enough_fds_left = 0;
static void serialize_unlock (void);
+static void serialize_lock (void);
+
hdb_handle_t corosync_poll_handle_get (void)
{
return (corosync_poll_handle);
@@ -211,14 +213,7 @@ static void unlink_all_completed (void)
serialize_unlock ();
api->timer_delete (corosync_stats_timer_handle);
poll_stop (corosync_poll_handle);
- totempg_finalize ();
-
- /*
- * Remove pid lock file
- */
- unlink (corosync_lock_file);
-
- corosync_exit_error (AIS_DONE_EXIT);
+ serialize_lock ();
}
void corosync_shutdown_request (void)
@@ -1887,6 +1882,17 @@ int main (int argc, char **argv, char **envp)
*/
poll_run (corosync_poll_handle);
+ /*
+ * Exit was requested
+ */
+ totempg_finalize ();
+
+ /*
+ * Remove pid lock file
+ */
+ unlink (corosync_lock_file);
+
+ corosync_exit_error (AIS_DONE_EXIT);
+
return EXIT_SUCCESS;
}
-
--
1.7.1
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais