blob: bdce8b19b65fd8df697bd2061764acf91d3bf3f1 [file] [log] [blame]
Elliott Hughes5dec78d2014-02-26 15:56:23 -08001/* for CLONE_foo: */
2#define _GNU_SOURCE 1
3
4#include <stdio.h>
5#include <stdlib.h>
6#include <sched.h>
7#include <unistd.h>
8
9int child(void* arg)
10{
11 write(1, "clone\n", 6);
12 return 0;
13}
14
15int main(int argc, char *argv[])
16{
17 char stack[4096];
18 clone(child, stack+4000, CLONE_VM|CLONE_FS|CLONE_FILES, NULL);
19 write(1, "original\n", 9);
20 exit(0);
21}