pub unsafe extern "C" fn krun_set_exec(
ctx_id: u32,
exec_path: *const c_char,
argv: *const *const c_char,
envp: *const *const c_char,
) -> i32Expand description
Sets the path to the executable to be run inside the microVM, the arguments to be passed to the executable, and the environment variables to be configured in the context of the executable.
Arguments: “ctx_id” - the configuration context ID. “exec_path” - the path to the executable, relative to the root configured with “krun_set_root”. “argv” - an array of string pointers to be passed as arguments. “envp” - an array of string pointers to be injected as environment variables into the context of the executable. If NULL, it will auto-generate an array collecting the the variables currently present in the environment.
Returns: Zero on success or a negative error number on failure.