Verify that the chdir(2) succeeds.
Signed-off-by: Mark Santcroos <mark.santcroos@rutgers.edu>
Этот коммит содержится в:
родитель
36ac54b5d8
Коммит
af3a6e1a29
@ -16,6 +16,8 @@
|
||||
* Copyright (c) 2011-2014 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2017 Rutgers, The State University of New Jersey.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -425,7 +427,16 @@ static int do_child(orte_odls_spawn_caddy_t *cd, int write_fd)
|
||||
|
||||
/* take us to the correct wdir */
|
||||
if (NULL != cd->wdir) {
|
||||
chdir(cd->wdir);
|
||||
if (0 != chdir(cd->wdir)) {
|
||||
send_error_show_help(write_fd, 1,
|
||||
"help-orterun.txt",
|
||||
"orterun:wdir-not-found",
|
||||
orte_basename,
|
||||
cd->wdir,
|
||||
orte_process_info.nodename,
|
||||
cd->child->app_rank);
|
||||
/* Does not return */
|
||||
}
|
||||
}
|
||||
|
||||
/* Exec the new executable */
|
||||
|
@ -16,6 +16,8 @@
|
||||
* Copyright (c) 2011-2013 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2017 Rutgers, The State University of New Jersey.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -416,7 +418,16 @@ static int do_child(orte_odls_spawn_caddy_t *cd, int write_fd)
|
||||
|
||||
/* take us to the correct wdir */
|
||||
if (NULL != cd->wdir) {
|
||||
chdir(cd->wdir);
|
||||
if (0 != chdir(cd->wdir)) {
|
||||
send_error_show_help(write_fd, 1,
|
||||
"help-orterun.txt",
|
||||
"orterun:wdir-not-found",
|
||||
orte_basename,
|
||||
cd->wdir,
|
||||
orte_process_info.nodename,
|
||||
cd->child->app_rank);
|
||||
/* Does not return */
|
||||
}
|
||||
}
|
||||
|
||||
/* Exec the new executable */
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user