signal_flags = SIGHUP | SIGINT | SIGQUIT | SIGILL |
               SIGTRAP | SIGABRT | SIGSTKFLT | SIGFPE |
               SIGKILL | SIGBUS | SIGSEGV | SIGXCPU |
               SIGPIPE | SIGALRM | SIGTERM | SIGUSR1 |
               SIGUSR2 | SIGCHLD | SIGPWR | SIGVTALRM |
               SIGPROF | SIGIO | SIGWINCH | SIGSTOP |
               SIGTSTP | SIGCONT | SIGTTIN | SIGTTOU |
               SIGURG | SIGXFSZ | SIGSYS | SIGRTMIN;

opt_flags =
    // Optional flags
    //
    // Share the parent's virtual memory
    CLONE_VM |
    // Share the parent's filesystem
    CLONE_FS |
    // Share the parent's file descriptor table
    CLONE_FILES |
    // Share the parent's signal handlers
    CLONE_SIGHAND |
    // Place child in the same thread group as parent
    CLONE_THREAD |
    // Share the parent's System V semaphore adjustments
    CLONE_SYSVSEM |
    // Suspend parent until the child exits or calls `execve`
    CLONE_VFORK |
    // Create a new mount namespace for the child
    CLONE_NEWNS |
    // Write child `TID` to parent's memory
    CLONE_PARENT_SETTID |
    // Allocate a `PID` file descriptor for the child
    CLONE_PIDFD |
    // Set thread-local storage for the child
    CLONE_SETTLS |
    // Write child `TID` to child's memory
    CLONE_CHILD_SETTID |
    // Clear child `TID` in child's memory on exit
    CLONE_CHILD_CLEARTID |
    // Make the child's parent the same as the caller's parent
    CLONE_PARENT;

// Create a thread or process
clone(
    fn, stack,
    flags = <opt_flags> | <signal_flags>,
    func_arg, ..
);
