1
1

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.
Этот коммит содержится в:
Jeff Squyres 2006-02-17 16:15:21 +00:00
родитель 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;
}
}
}