---
name: "__clone2"
section: "2"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/clone2"
---

# \_\_clone2(2)

create a child process

Part of [clone2(2)](/clone2/2.md).

## NAME

clone2, \_\_clone2 - create a child process

## LIBRARY

Standard C library (*libc*, *-lc*)

## SYNOPSIS

```
// 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***);**

## DESCRIPTION

These interfaces are similar to [**clone**(2)](/clone/2.md) but for ia64.

These interfaces operate in the same way as [**clone**(2)](/clone/2.md), 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)](/clone/2.md).

## ERRORS

See [**clone**(2)](/clone/2.md).

## STANDARDS

None.

## HISTORY

Linux (ia64).

## SEE ALSO

[**clone**(2)](/clone/2.md)
