src/util/session_dir.c
/*
 * Check and create the directory requested
 */
Check and create the directory requested
Check and create the directory requested
static int prte_create_dir(char *directory)
{
    mode_t my_mode = S_IRWXU; 
    int ret;
    if (PRTE_ERR_NOT_FOUND != (ret = prte_os_dirpath_access(directory, my_mode))) {
        if (PRTE_SUCCESS != ret) {
            PRTE_ERROR_LOG(ret);
        }
        return (ret);
    }
    if (PRTE_SUCCESS != (ret = prte_os_dirpath_create(directory, my_mode))) {
        PRTE_ERROR_LOG(ret);
    }
    return ret;
}
static int prte_create_dir ( char * directory ) { mode_t my_mode = S_IRWXU ; int ret ; if ( PRTE_ERR_NOT_FOUND != ( ret = prte_os_dirpath_access ( directory , my_mode ) ) ) { if ( PRTE_SUCCESS != ret ) { PRTE_ERROR_LOG ( ret ) ; } return ( ret ) ; } if ( PRTE_SUCCESS != ( ret = prte_os_dirpath_create ( directory , my_mode ) ) ) { PRTE_ERROR_LOG ( ret ) ; } return ret ; }
Check and create the directory requested
Check and create the directory requested
/* I'm looking for full rights */ /* Sanity check before creating the directory with the proper mode,
     * Make sure it doesn't exist already */ /* Failure because prte_os_dirpath_access() indicated that either:
         * - The directory exists and we can access it (no need to create it again),
         *    return PRTE_SUCCESS, or
         * - don't have access rights, return PRTE_ERROR
         */ /* Get here if the directory doesn't exist, so create it */