Skip to content

Commit aeafbde

Browse files
authored
Merge pull request #10040 from awlauria/fix_shm_file_leak
Fix leak of sm_segment files in /dev/shm.
2 parents fd2e445 + 7412e27 commit aeafbde

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

opal/mca/pmix/base/pmix_base_fns.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,8 +492,13 @@ int opal_pmix_register_cleanup(char *path, bool directory, bool ignore, bool job
492492
rc = PMIx_Job_control_nb(NULL, 0, pinfo, ninfo, cleanup_cbfunc, (void *) &lk);
493493
} else {
494494
/* only applies to us */
495-
(void) snprintf(proc.nspace, PMIX_MAX_NSLEN, "%s",
496-
OPAL_JOBID_PRINT(OPAL_PROC_MY_NAME.jobid));
495+
pmix_nspace_t nspace;
496+
if(OPAL_SUCCESS == opal_pmix_convert_jobid(nspace, OPAL_PROC_MY_NAME.jobid)) {
497+
(void) snprintf(proc.nspace, PMIX_MAX_NSLEN, "%s", nspace);
498+
}
499+
else {
500+
(void) snprintf(proc.nspace, PMIX_MAX_NSLEN, "%s", OPAL_JOBID_PRINT(OPAL_PROC_MY_NAME.jobid));
501+
}
497502
proc.rank = OPAL_PROC_MY_NAME.vpid;
498503
rc = PMIx_Job_control_nb(&proc, 1, pinfo, ninfo, cleanup_cbfunc, (void *) &lk);
499504
}

0 commit comments

Comments
 (0)