This bit accidentally got lost in the testing of the bproc/fork path
and cwd update functionality. For bproc, we *do* need to change directories while checking the cwd because argv[0] may be expressed as a relative path, and therefore needs to be checked from the cwd expressed in the app context. This commit was SVN r9084.
Этот коммит содержится в:
родитель
2c91ac861a
Коммит
22da6ef4e4
@ -841,8 +841,10 @@ int orte_pls_bproc_launch(orte_jobid_t jobid) {
|
||||
for (i = 0; i < map->num_procs; ++i) {
|
||||
orte_app_context_t *context = map->app;
|
||||
|
||||
/* Check that the cwd is sane, but don't chdir there */
|
||||
rc = orte_pls_base_check_context_cwd(context, false);
|
||||
/* Check that the cwd is sane. We have to chdir there in
|
||||
to check the executable, because the executable could
|
||||
have been specified as a relative path to the wdir */
|
||||
rc = orte_pls_base_check_context_cwd(context, true);
|
||||
if (ORTE_SUCCESS != rc) {
|
||||
goto cleanup;
|
||||
}
|
||||
@ -852,6 +854,12 @@ int orte_pls_bproc_launch(orte_jobid_t jobid) {
|
||||
if (ORTE_SUCCESS != rc) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* Return to the original dir */
|
||||
if (0 != chdir(cwd_save)) {
|
||||
rc = ORTE_ERR_IN_ERRNO;
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user