strace/test/clone.c
Wichert Akkerman 9b0c31d663 process.c: perform bpt trick for clone as well so we can get the pid of the child before it starts doing something
file.c: rename dirent64 struct to kernel_dirent64 so things compile again with newer libcs
2000-09-03 21:56:29 +00:00

17 lines
247 B
C

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