18.3.23. pmix_envar_t

pmix_envar_t — Specifies a modification to an environment variable

18.3.23.1. SYNTAX

18.3.23.1.1. C Syntax

#include <pmix_common.h>

typedef struct {
    char *envar;
    char *value;
    char separator;
} pmix_envar_t;

18.3.23.2. DESCRIPTION

The pmix_envar_t structure specifies a modification to be made to an environment variable. Standard environment variables (e.g., PATH, LD_LIBRARY_PATH, and LD_PRELOAD) take multiple arguments separated by delimiters. Unfortunately, the delimiters depend upon the variable itself — some use semi-colons, some colons, etc. Thus, the operation requires not only the name of the variable to be modified and the value to be inserted, but also the separator to be used when composing the aggregate value.

The fields are:

envar

The name of the environment variable to be modified, given as a string.

value

The value to be inserted into the named environment variable.

separator

The single character used as the delimiter when composing the aggregate value of the environment variable from its constituent arguments.

18.3.23.3. STATIC INITIALIZER

A statically declared pmix_envar_t may be initialized with the PMIX_ENVAR_STATIC_INIT macro, which sets envar and value to NULL and separator to the null character '\0':

pmix_envar_t envar = PMIX_ENVAR_STATIC_INIT;