Struct nc::types::clone_args_t
source · #[repr(C)]pub struct clone_args_t {
pub flags: u64,
pub pidfd: u64,
pub child_tid: u64,
pub parent_tid: u64,
pub exit_signal: u64,
pub stack: u64,
pub stack_size: u64,
pub tls: u64,
pub set_tid: u64,
pub set_tid_size: u64,
pub cgroup: u64,
}
Expand description
Arguments for the clone3 syscall.
The structure is versioned by size and thus extensible. New struct members must go at the end of the struct and must be properly 64bit aligned.
Fields§
§flags: u64
Flags for the new process.
All flags are valid except for CSIGNAL and CLONE_DETACHED
.
pidfd: u64
If CLONE_PIDFD
is set, a pidfd will be returned in this argument.
child_tid: u64
If CLONE_CHILD_SETTID
is set, the TID of the child process
will be returned in the child’s memory.
parent_tid: u64
If CLONE_PARENT_SETTID
is set, the TID of the child process
will be returned in the parent’s memory.
exit_signal: u64
The exit_signal the parent process will be sent when the child exits.
stack: u64
Specify the location of the stack for the child process.
Note, @stack is expected to point to the lowest address.
The stack direction will be determined by the kernel and
set up appropriately based on @stack_size
.
stack_size: u64
The size of the stack for the child process.
tls: u64
If CLONE_SETTLS
is set, the tls descriptor is set to tls.
set_tid: u64
Pointer to an array of type *pid_t.
The size of the array is defined using set_tid_size
.
This array is used to select PIDs/TIDs for newly created processes.
The first element in this defines the PID in the most nested PID namespace.
Each additional element in the array defines the PID
in the parent PID namespace of the original PID namespace. If the array has less entries
than the number of currently nested PID namespaces only the PIDs in the corresponding namespaces are set.
set_tid_size: u64
This defines the size of the array referenced in set_tid
.
This cannot be larger than the kernel’s limit of nested PID namespaces.
cgroup: u64
If CLONE_INTO_CGROUP
is specified set this to a file descriptor for the cgroup.
Trait Implementations§
source§impl Clone for clone_args_t
impl Clone for clone_args_t
source§fn clone(&self) -> clone_args_t
fn clone(&self) -> clone_args_t
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more