pub fn clone(
    cb: Box<dyn FnMut(), Global>,
    stack: &mut [u8],
    flags: CloneFlags,
    signal: Option<i32>
) -> Result<Pid, Errno>
Expand description

clone create a child process (clone(2))

stack is a reference to an array which will hold the stack of the new process. Unlike when calling clone(2) from C, the provided stack address need not be the highest address of the region. Nix will take care of that requirement. The user only needs to provide a reference to a normally allocated buffer.