blob: 335086fcb70723dd53cc1fc4f99b5147ed16061a [file] [log] [blame]
Wichert Akkerman529f06d2000-04-10 22:26:39 +00001#include <stdio.h>
Denys Vlasenko8ed57272009-02-25 14:24:02 +00002#include <stdlib.h>
Wichert Akkerman529f06d2000-04-10 22:26:39 +00003#include <sched.h>
4
Denys Vlasenko8ed57272009-02-25 14:24:02 +00005int child(void* arg)
6{
7 write(1, "clone\n", 6);
8 return 0;
Wichert Akkerman529f06d2000-04-10 22:26:39 +00009}
10
Denys Vlasenko8ed57272009-02-25 14:24:02 +000011int main(int argc, char *argv[])
Wichert Akkerman529f06d2000-04-10 22:26:39 +000012{
Denys Vlasenko8ed57272009-02-25 14:24:02 +000013 char stack[4096];
Wichert Akkerman9b0c31d2000-09-03 21:56:29 +000014 clone(child, stack+4000, CLONE_VM|CLONE_FS|CLONE_FILES, NULL);
15 write(1, "original\n", 9);
Wichert Akkerman529f06d2000-04-10 22:26:39 +000016 exit(0);
17}