#[repr(C)]
pub struct clone_args { 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

struct clone_args - arguments for the clone3 syscall @flags: Flags for the new process as listed above. All flags are valid except for CSIGNAL and CLONE_DETACHED. @pidfd: If CLONE_PIDFD is set, a pidfd will be returned in this argument. @child_tid: If CLONE_CHILD_SETTID is set, the TID of the child process will be returned in the child’s memory. @parent_tid: If CLONE_PARENT_SETTID is set, the TID of the child process will be returned in the parent’s memory. @exit_signal: The exit_signal the parent process will be sent when the child exits. @stack: 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: The size of the stack for the child process. @tls: If CLONE_SETTLS is set, the tls descriptor is set to tls. @set_tid: 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: 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: If CLONE_INTO_CGROUP is specified set this to a file descriptor for the cgroup.

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§pidfd: __u64§child_tid: __u64§parent_tid: __u64§exit_signal: __u64§stack: __u64§stack_size: __u64§tls: __u64§set_tid: __u64§set_tid_size: __u64§cgroup: __u64

Trait Implementations§

source§

impl Clone for clone_args

source§

fn clone(&self) -> clone_args

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for clone_args

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Copy for clone_args

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.