src/util/session_dir.c
/*
 * Construct the session directory and create it if necessary
 */
Construct the session directory and create it if necessary
Construct the session directory and create it if necessary
int prte_session_dir(bool create, pmix_proc_t *proc)
{
    int rc = PRTE_SUCCESS;
    if (PRTE_SUCCESS != (rc = prte_session_setup_base(proc))) {
        if (PRTE_ERR_FATAL == rc) {
            rc = PRTE_ERR_SILENT;
        }
        goto cleanup;
    }
    if (create) {
        if (PRTE_SUCCESS != (rc = prte_create_dir(prte_process_info.proc_session_dir))) {
            PRTE_ERROR_LOG(rc);
            goto cleanup;
        }
    }
    if (prte_debug_flag) {
        prte_output(0, "procdir: %s", PRTE_PRINTF_FIX_STRING(prte_process_info.proc_session_dir));
        prte_output(0, "jobdir: %s", PRTE_PRINTF_FIX_STRING(prte_process_info.job_session_dir));
        prte_output(0, "job: %s", PRTE_PRINTF_FIX_STRING(prte_process_info.jobfam_session_dir));
        prte_output(0, "top: %s", PRTE_PRINTF_FIX_STRING(prte_process_info.top_session_dir));
        prte_output(0, "tmp: %s", PRTE_PRINTF_FIX_STRING(prte_process_info.tmpdir_base));
    }
cleanup:
    return rc;
}
int prte_session_dir ( bool create , pmix_proc_t * proc ) { int rc = PRTE_SUCCESS ; if ( PRTE_SUCCESS != ( rc = prte_session_setup_base ( proc ) ) ) { if ( PRTE_ERR_FATAL == rc ) { rc = PRTE_ERR_SILENT ; } goto cleanup ; } if ( create ) { if ( PRTE_SUCCESS != ( rc = prte_create_dir ( prte_process_info . proc_session_dir ) ) ) { PRTE_ERROR_LOG ( rc ) ; goto cleanup ; } } if ( prte_debug_flag ) { prte_output ( 0 , " " , PRTE_PRINTF_FIX_STRING ( prte_process_info . proc_session_dir ) ) ; prte_output ( 0 , " " , PRTE_PRINTF_FIX_STRING ( prte_process_info . job_session_dir ) ) ; prte_output ( 0 , " " , PRTE_PRINTF_FIX_STRING ( prte_process_info . jobfam_session_dir ) ) ; prte_output ( 0 , " " , PRTE_PRINTF_FIX_STRING ( prte_process_info . top_session_dir ) ) ; prte_output ( 0 , " " , PRTE_PRINTF_FIX_STRING ( prte_process_info . tmpdir_base ) ) ; } cleanup : return rc ; }
Construct the session directory and create it if necessary
Construct the session directory and create it if necessary
/*
     * Get the session directory full name
     */ /* this indicates we should abort quietly */ /*
     * Now that we have the full path, go ahead and create it if necessary
     */