Skip to main content

xila_env_get

Function xila_env_get 

Source
pub unsafe extern "C" fn xila_env_get(
    process: *const Process,
    name: *const c_char,
    name_length: usize,
    buffer: *mut c_char,
    capacity: usize,
    value_length: *mut usize,
) -> Status
Expand description

Read an environment variable. The value is copied without a terminator; the length is stored on success and on BufferTooSmall, which leaves the buffer unchanged. A null buffer is allowed at capacity zero. A missing variable returns NotFound.

ยงSafety

Process must be a live capability. Name must be readable for its length, the buffer writable for its capacity and the length output aligned and writable.