Wichert Akkerman | 529f06d | 2000-04-10 22:26:39 +0000 | [diff] [blame] | 1 | #include <stdio.h> |
2 | #include <sched.h> | ||||
3 | |||||
4 | int child(void* arg) { | ||||
5 | write(1, "clone\n", 6); | ||||
6 | return 0; | ||||
7 | } | ||||
8 | |||||
9 | int | ||||
10 | main() | ||||
11 | { | ||||
12 | char stack[4096]; | ||||
Wichert Akkerman | 9b0c31d | 2000-09-03 21:56:29 +0000 | [diff] [blame] | 13 | clone(child, stack+4000, CLONE_VM|CLONE_FS|CLONE_FILES, NULL); |
14 | write(1, "original\n", 9); | ||||
Wichert Akkerman | 529f06d | 2000-04-10 22:26:39 +0000 | [diff] [blame] | 15 | exit(0); |
16 | } |