strace/test/clone.c
Dmitry V. Levin 184e94ba05 Fix a few spacing style issues
Reported by kernel's checkpatch.pl script.
2017-06-17 22:54:08 +00:00

22 lines
343 B
C

/* for CLONE_foo: */
#define _GNU_SOURCE 1
#include <stdio.h>
#include <stdlib.h>
#include <sched.h>
#include <unistd.h>
int child(void *arg)
{
write(1, "clone\n", 6);
return 0;
}
int main(int argc, char *argv[])
{
char stack[4096];
clone(child, stack+4000, CLONE_VM|CLONE_FS|CLONE_FILES, NULL);
write(1, "original\n", 9);
exit(0);
}