]> granicus.if.org Git - strace/commitdiff
add clone test
authorWichert Akkerman <wichert@deephackmode.org>
Mon, 10 Apr 2000 22:26:39 +0000 (22:26 +0000)
committerWichert Akkerman <wichert@deephackmode.org>
Mon, 10 Apr 2000 22:26:39 +0000 (22:26 +0000)
test/clone.c [new file with mode: 0644]

diff --git a/test/clone.c b/test/clone.c
new file mode 100644 (file)
index 0000000..4fb6613
--- /dev/null
@@ -0,0 +1,16 @@
+#include <stdio.h>
+#include <sched.h>
+
+int child(void* arg) {
+    write(1, "clone\n", 6);
+    return 0;
+}
+
+int
+main()
+{
+       char    stack[4096];
+       if (clone(child, stack+4000, CLONE_VM|CLONE_FS|CLONE_FILES, NULL) == 0)
+               write(1, "original\n", 9);
+       exit(0);
+}