|
16 | 16 | * Copyright (c) 2011-2013 Cisco Systems, Inc. All rights reserved.
|
17 | 17 | * Copyright (c) 2015 Research Organization for Information Science
|
18 | 18 | * and Technology (RIST). All rights reserved.
|
19 |
| - * Copyright (c) 2015 Intel, Inc. All rights reserved. |
| 19 | + * Copyright (c) 2015-2017 Intel, Inc. All rights reserved. |
20 | 20 | * Copyright (c) 2017 UT-Battelle, LLC. All rights reserved.
|
21 | 21 | * $COPYRIGHT$
|
22 | 22 | *
|
@@ -128,6 +128,7 @@ main(int argc, char *argv[])
|
128 | 128 | #if OPAL_ENABLE_FT_CR == 1
|
129 | 129 | char *tmp_env_var;
|
130 | 130 | #endif
|
| 131 | + char *legacy; |
131 | 132 |
|
132 | 133 | /* This is needed so we can print the help message */
|
133 | 134 | if (ORTE_SUCCESS != (ret = opal_init_util(&argc, &argv))) {
|
@@ -174,6 +175,18 @@ main(int argc, char *argv[])
|
174 | 175 | }
|
175 | 176 | opal_os_dirpath_destroy(orte_process_info.top_session_dir, true, NULL);
|
176 | 177 |
|
| 178 | + /* also get rid of any legacy session directories */ |
| 179 | + asprintf(&legacy, "%s/openmpi-sessions-%d@%s_0", |
| 180 | + orte_process_info.tmpdir_base, |
| 181 | + (int)geteuid(), orte_process_info.nodename); |
| 182 | + opal_os_dirpath_destroy(legacy, true, NULL); |
| 183 | + free(legacy); |
| 184 | + |
| 185 | + /* and finally get rid of any lingering pmix-related artifacts */ |
| 186 | + asprintf(&legacy, "rm -f %s/pmix*", orte_process_info.tmpdir_base); |
| 187 | + system(legacy); |
| 188 | + free(legacy); |
| 189 | + |
177 | 190 | /* now kill any lingering procs, if we can */
|
178 | 191 | kill_procs();
|
179 | 192 |
|
@@ -415,7 +428,7 @@ void kill_procs(void) {
|
415 | 428 | }
|
416 | 429 | }
|
417 | 430 | free(inputline);
|
418 |
| - free(procname); |
| 431 | + free(procname); |
419 | 432 | }
|
420 | 433 | free(this_user);
|
421 | 434 | pclose(psfile);
|
|
0 commit comments