aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mds-server.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mds-server.c b/src/mds-server.c
index 3b9264a..1e3362c 100644
--- a/src/mds-server.c
+++ b/src/mds-server.c
@@ -397,15 +397,15 @@ int main(int argc_, char** argv_)
int reexec_fd;
char shm_path[NAME_MAX + 1];
- /* Release resources. */
- pthread_mutex_destroy(&slave_mutex);
- pthread_cond_destroy(&slave_cond);
-
/* Join with all slaves threads. */
with_mutex(slave_mutex,
while (running_slaves > 0)
pthread_cond_wait(&slave_cond, &slave_mutex););
+ /* Release resources. */
+ pthread_mutex_destroy(&slave_mutex);
+ pthread_cond_destroy(&slave_cond);
+
/* Marshal the state of the server. */
xsnprintf(shm_path, SHM_PATH_PATTERN, (unsigned long int)pid);
reexec_fd = shm_open(shm_path, O_RDWR | O_CREAT | O_EXCL, S_IRWXU);