LXC
Data Fields
lxc_attach_options_t Struct Reference

#include <attach_options.h>

Data Fields

int attach_flags
 
int namespaces
 
long personality
 
char * initial_cwd
 
uid_t uid
 
gid_t gid
 
lxc_attach_env_policy_t env_policy
 
char ** extra_env_vars
 
char ** extra_keep_env
 
int stdin_fd
 
int stdout_fd
 
int stderr_fd
 

Detailed Description

LXC attach options for lxc_container attach().

Field Documentation

int lxc_attach_options_t::attach_flags

Any combination of LXC_ATTACH_* flags

lxc_attach_env_policy_t lxc_attach_options_t::env_policy

Environment policy

char** lxc_attach_options_t::extra_env_vars

Extra environment variables to set in the container environment

char** lxc_attach_options_t::extra_keep_env

Names of environment variables in existing environment to retain in container environment.

gid_t lxc_attach_options_t::gid

The group-id to run as.

Note
Set to -1 for default behaviour (init gid for userns containers or 0 (super-user) if detection fails).
char* lxc_attach_options_t::initial_cwd

Initial current directory, use NULL to use cwd. If the current directory does not exist in the container, the root directory will be used instead because of kernel defaults.

int lxc_attach_options_t::namespaces

The namespaces to attach to (CLONE_NEW... flags)

long lxc_attach_options_t::personality

Initial personality (-1 to autodetect).

Warning
This may be ignored if lxc is compiled without personality support)
int lxc_attach_options_t::stderr_fd

stderr file descriptor

int lxc_attach_options_t::stdin_fd

File descriptors for stdin, stdout and stderr, dup2() will be used before calling exec_function, (assuming not 0, 1 and 2 are specified) and the original fds are closed before passing control over. Any O_CLOEXEC flag will be removed after that.stdin file descriptor

int lxc_attach_options_t::stdout_fd

stdout file descriptor

uid_t lxc_attach_options_t::uid

The user-id to run as.

Note
Set to -1 for default behaviour (init uid for userns containers or 0 (super-user) if detection fails).

The documentation for this struct was generated from the following file: