+
+ sigblocked = 0;
+ ret = pthread_sigmask(SIG_SETMASK, &orig_sigs, NULL);
+ if (ret == -1) {
+ PERROR("pthread_sigmask");
+ goto error_sigmask_release;
+ }
+
+ /* Create unique symlink to shm */
+ shm_path = zmalloc(strlen(base_shm) + strlen(tmp_name) + 1);
+
+ if (!shm_path) {
+ goto error_shm_alloc;
+ }
+
+ strncat(shm_path, base_shm, strlen(base_shm));
+ strncat(shm_path, tmp_name, strlen(tmp_name));
+
+ shm_file = gen_unique_name(shm_prefix);
+
+ if (!shm_file) {
+ free(shm_path);
+ goto error_gen_unique_shm;
+ }
+
+ shm_symlink_path = zmalloc(strlen(base_path) + strlen(shm_file) + 1);
+
+ if (!shm_symlink_path) {
+ free(shm_path);
+ free(shm_file);
+ goto error_symlink_alloc;
+ }
+
+ strncat(shm_symlink_path, base_path, strlen(base_path));
+ strncat(shm_symlink_path, shm_file, strlen(shm_file));
+
+ free(shm_file);
+
+ ret = symlink(shm_path, shm_symlink_path);
+ if (ret < 0) {
+ PERROR("symlink");
+ free(shm_path);
+ free(shm_symlink_path);
+ goto error_symlink_shm;
+ }
+
+ free(shm_path);
+
+ ret = zero_file(shmfd, memory_map_size);
+ if (ret) {
+ PERROR("zero_file");
+ goto error_zero_file;