clone2(2)

clone22

Create a child process

Usage

// glibc wrapper:
int __clone2(typeof(int (void *)) *fn,
             void *stack_base, size_t stack_size,
             int flags, void *arg, ...
          /* pid_t *parent_tid, struct user_desc *tls,
             pid_t *child_tid */ );

// System call: long syscall(SYS_clone2, unsigned long flags, void *stack_base, int stack_size, /* Size of stack */ int *parent_tid, int *child_tid, unsigned long tls);

Library

Standard C library (libc, -lc)

Overview

These interfaces are similar to clone(2) but for ia64.

These interfaces operate in the same way as clone(2), except that stack_base points to the lowest address of the child's stack area, and stack_size specifies the size of the stack pointed to by stack_base.

Return value

See clone(2).

Errors

See clone(2).

Releases

10 releases since Debian 5.0 (Lenny); the text changed 9 times.

  1. 5.0
  2. 6.0
  3. 7
  4. 8
  5. 9
  6. 10
  7. 11
  8. 12
  9. 13
  10. Arch

Standards

None.

History

Linux (ia64).

From man-pages 6.19-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.