clone_args.h
· 1.1 KiB · C
Неформатований
#pragma once
#include "linux/types.h"
#include <linux/sched.h>
#include <asm-generic/siginfo.h>
#define SYS_clone3 435
#define SIGCHLD 17
typedef struct {
__aligned_u64 flags; /* Flags bit mask */
__aligned_u64 pidfd; /* Where to store PID file descriptor
(int *) */
__aligned_u64 child_tid; /* Where to store child TID,
in child's memory (pid_t *) */
__aligned_u64 parent_tid; /* Where to store child TID,
in parent's memory (pid_t *) */
__aligned_u64 exit_signal; /* Signal to deliver to parent on
child termination */
__aligned_u64 stack; /* Pointer to lowest byte of stack */
__aligned_u64 stack_size; /* Size of stack */
__aligned_u64 tls; /* Location of new TLS */
__aligned_u64 set_tid; /* Pointer to a pid_t array
(since Linux 5.5) */
__aligned_u64 set_tid_size; /* Number of elements in set_tid
(since Linux 5.5) */
__aligned_u64 cgroup; /* File descriptor for target cgroup */
} CloneArgs;
1 | #pragma once |
2 | #include "linux/types.h" |
3 | #include <linux/sched.h> |
4 | #include <asm-generic/siginfo.h> |
5 | |
6 | #define SYS_clone3 435 |
7 | #define SIGCHLD 17 |
8 | |
9 | typedef struct { |
10 | __aligned_u64 flags; /* Flags bit mask */ |
11 | __aligned_u64 pidfd; /* Where to store PID file descriptor |
12 | (int *) */ |
13 | __aligned_u64 child_tid; /* Where to store child TID, |
14 | in child's memory (pid_t *) */ |
15 | __aligned_u64 parent_tid; /* Where to store child TID, |
16 | in parent's memory (pid_t *) */ |
17 | __aligned_u64 exit_signal; /* Signal to deliver to parent on |
18 | child termination */ |
19 | __aligned_u64 stack; /* Pointer to lowest byte of stack */ |
20 | __aligned_u64 stack_size; /* Size of stack */ |
21 | __aligned_u64 tls; /* Location of new TLS */ |
22 | __aligned_u64 set_tid; /* Pointer to a pid_t array |
23 | (since Linux 5.5) */ |
24 | __aligned_u64 set_tid_size; /* Number of elements in set_tid |
25 | (since Linux 5.5) */ |
26 | __aligned_u64 cgroup; /* File descriptor for target cgroup */ |
27 | } CloneArgs; |
28 |