strace/test/clone.c
Denys Vlasenko 8158e7716c Update test/* directory, it seem to be a bit bit-rotted
Added README; modified sigkill_rain.c to be more understandable,
made clone.c compile; added wait_must_be_interruptible.c test;
updated Makefile and .gitignore.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-06-08 14:08:59 +02:00

21 lines
323 B
C

/* for CLONE_foo: */
#define _GNU_SOURCE 1
#include <stdio.h>
#include <stdlib.h>
#include <sched.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);
}