1
1

Ensure we cleanup some files so session dirs can be rolled up

cmr=v1.8.2:reviewer=jsquyres

This commit was SVN r31569.
Этот коммит содержится в:
Ralph Castain 2014-04-30 17:52:10 +00:00
родитель 751b4325b3
Коммит 7a79b25577
2 изменённых файлов: 28 добавлений и 8 удалений

Просмотреть файл

@ -1081,15 +1081,17 @@ int orterun(int argc, char *argv[])
/* ensure all local procs are dead */
orte_odls.kill_local_procs(NULL);
DONE:
/* if it was created, remove the debugger attach fifo */
if (fifo_active) {
opal_event_del(attach);
free(attach);
if (0 <= attach_fd) {
if (fifo_active) {
opal_event_del(attach);
free(attach);
}
close(attach_fd);
unlink(MPIR_attach_fifo);
}
DONE:
/* cleanup and leave */
orte_finalize();

Просмотреть файл

@ -677,11 +677,20 @@ CLEANUP:
static bool
orte_dir_check_file(const char *root, const char *path)
{
struct stat st;
char *fullpath;
/*
* Keep:
* - files starting with "output-"
* - non-zero files starting with "output-"
*/
if (0 == strncmp(path, "output-", strlen("output-"))) {
fullpath = opal_os_path(false, &fullpath, root, path, NULL);
stat(fullpath, &st);
free(fullpath);
if (0 == st.st_size) {
return true;
}
return false;
}
@ -691,14 +700,23 @@ orte_dir_check_file(const char *root, const char *path)
static bool
orte_dir_check_file_output(const char *root, const char *path)
{
struct stat st;
char *fullpath;
/*
* Keep:
* - files starting with "output-"
* - non-zero files starting with "output-"
*/
if( 0 == strncmp(path, "output-", strlen("output-"))) {
if (0 == strncmp(path, "output-", strlen("output-"))) {
fullpath = opal_os_path(false, &fullpath, root, path, NULL);
stat(fullpath, &st);
free(fullpath);
if (0 == st.st_size) {
return true;
}
return false;
}
return true;
}